On 2014-05-16 09:41-0400 Ben Boeckel wrote:

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

Not everything supports response files (it's usually compilers and MS
tools). One thing we could do is detect when an add_custom_command or
add_custom_target might run foul of command line length limits and warn
for it. I don't know what else we could do without teaching CMake about
every command's semantics. I suppose we could add response file wrappers
around all long command lines, but command line parsing on Windows can
be 100% custom, so there might need problems there :/ .

I agree if there is no way to deal with the problem generally and in a
simple manner, then the KISS principle applies and nothing should be
changed.  That probably includes even attempting to warn about a line
that is too long for the cmd environment because as you can see from
my OP, the warning about that (presumably passed back from cmd) is
already pretty obvious.

Thanks very much for this interesting discussion of the possibilities.

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