I have recently been reminded that the "cmake -E remove" command has a limitation due to the length of command line that is acceptable to whatever shell is being used. Is there any willingness to remove that limitation (in which case it would be worthwhile for me to make a formal bug report) or is this limitation something that should just be accepted indefinitely?
The reason I ask is the PLplot test suite has a combinatorial issue with the number of different tests that are possible. As currently implemented we are careful not to explore all combinations of the possibilities in our testing. Nevertheless, the typical result of ctest is ~5000 files which consume ~3GB of disk space. Therefore, I have implemented a convenience custom target to remove all those files as follows: add_custom_target(clean_ctest_plot_files COMMAND ${CMAKE_COMMAND} -E remove ${test_output_files_LIST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) where test_output_files_LIST contains the list of all the file names generated by ctest. When test_output_files_LIST was generated with absolute paths on Linux, the result was the (bash) shell line-length limit was exceeded, and the custom target failed. I was able to work around that issue by using relative paths instead, and the result has worked fine for several years using the "Unix Makefiles" generator on Linux and the "MSYS Makefiles" generator on Windows (in this case Wine, but that should not make a difference). But I have recently started doing comprehensive testing of the "MinGW Makefiles" generator on Wine, and for that cmd "shell" I run into the command-length limit yet again with this target. Here is the start of the relevant error message: Line in Batch processing possibly truncated. Using: cd /d Z:\home\wine\newstart\build_script\build_dir-1.6.1_mingw\epa_build\Source\comprehensive_test_disposeable\shared\build_tree\plplot_test && Z:\home\wine\newstart\cmake-2.8.12.1-win32-x86\bin\cmake.exe -E remove ./x01c.psc ./x01c_psc.txt ./x02c.psc ./x02c_psc.txt ./x03c.psc ./ x03c_psc.txt ./x04c.psc ./x04c_psc.txt ./x05c.psc ./x05c_psc.txt ./x06c.psc ./x06c_psc.txt ./x07c.psc ./x07c_psc.txt ./x08c.psc ./x08c_psc.t xt ./x09c.psc ./x09c_psc.txt ./x10c.psc ./x10c_psc.txt ./x11c.psc ./x11c_psc.txt ./x12c.psc ./x12c_psc.txt ./x13c.psc ./x13c_psc.txt ./x14c. psc ./x14c_psc.txt ./x14ac.psc ./x15c.psc ./x15c_psc.txt ./x16c.psc ./x16c_psc.txt ./x17c.psc ./x17c_psc.txt ./x18c.psc ./x18c_psc.txt ./x19 c [....] + subsequent crash. In the short term I plan to work around the issue by dividing test_output_files_LIST into sublists which are small enough not to exceed the line length limitation even for a cmd environment (although I don't know what that limit is at the moment), and then running cmake -E remove on each of those sublists. But in the long run my opinion is it would be better if the cmake -E remove command was given the smarts inside to do the same (especially since cmake is already well aware of command-line length limitations for various shell environments in other contexts). So if there is some chance that the cmake developers are willing to deal with this issue, then I am willing to start the ball rolling with a formal bug report. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ -- 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/cgi-bin/mailman/listinfo/cmake-developers