On 2014-05-15 21:51-0400 Ben Boeckel wrote:

On Thu, May 15, 2014 at 13:23:10 -0700, Alan W. Irwin wrote:
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?

This isn't limited to "cmake -E remove". The problem is that the line is
too long to even call "cmake -E remove", so no amount of code on CMake's
side will help here.

From what you say, and also my results it appears the current
situation is that CMake takes anything in a COMMAND and throws it out
to the shell without doing anything concerning the overall length of
the command.

Instead of working around this issue by doing anything complicated
along the lines you suggested or some additional complicated methods I
was considering, what I have decided to do instead is to tighten up
our build system so that all ctest-generated files are in a unique
directory in the build tree with absolutely nothing else in that
directory.  Then the clean up can easily be done by deleting that
whole directory using "cmake -E remove_directory" which obviously
eliminates the whole concern about cmd length.

Just in case I run into command-length limitations for the cmd
environment in other contexts that cannot be solved so neatly, I am
also wondering if cmd has a general mechanism (e.g., reading from a
file) to work around its severe command-length limitations.  And if
so, could the COMMAND implementation be changed to use that mechanism
behind the scenes when the cmd environment is detected without
changing the add_custom_command or add_custom_target syntax in the
slightest?

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

Reply via email to