On Tue, Jun 24, 2014 at 14:21:37 -0400, Brad King wrote: > On 06/24/2014 08:31 AM, Mojca Miklavec wrote: > > /path/to/cmake-3.0.0/Bootstrap.cmk/cmake -E cmake_link_script > > CMakeFiles/CMakeLib.dir/link.txt --verbose=1 > > > > isn't outputting the whole command, but cutting it in the middle instead. > > 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.
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 --Ben -- 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