[cmake-developers] Any plans to remove the limitation in command line length for the cmake -E remove command?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri May 16 15:49:32 EDT 2014


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
__________________________



More information about the cmake-developers mailing list