The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15039 ====================================================================== Reported By: Mojca Miklavec Assigned To: ====================================================================== Project: CMake Issue ID: 15039 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2014-07-27 04:07 EDT Last Modified: 2014-07-27 04:07 EDT ====================================================================== Summary: CMake linked against libc++ on OS X 10.7 cuts lines at 1024 characters Description: As already reported (http://public.kitware.com/pipermail/cmake-developers/2014-June/010712.html) building CMake on OS X 10.7 against libc++ fails because some lines are cut at 1024 characters when reading from link.txt.
If I manually execute a couple of commands that have been "cut", the build eventually succeeds, but the resulting cmake binary is "useless" because any project that requires lines longer than 1024 characters to compile code, fails to build as well. Steps to Reproduce: Compile CMake on OS X 10.7 using CC='/usr/bin/clang' CXX='/usr/bin/clang++' CXXFLAGS='-stdlib=libc++' Additional Information: Brad King wrote: The lines are read here: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmcmd.cxx;hb=v3.0.0#l988 using the GetLineFromStream helper: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/SystemTools.cxx;hb=v3.0.0#l4157 Note the buffer size is 1024. Something must go wrong with the stream state to make it look like EOL or EOF to this code. Ben Boeckel wrote: The proper way to read lines from a file using iostream is: std::string line; while (std::getline(istr, line)) { // use line } Unfortunately, it looks like there's unavoidable extra logic in there. Maybe we could do: #ifdef BROKEN_STREAMS // crutch code #else // sanity #endif ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-07-27 04:07 Mojca Miklavec New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers