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

Ben Boeckel ben.boeckel at kitware.com
Fri May 16 09:41:27 EDT 2014


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 :/ .

--Ben



More information about the cmake-developers mailing list