[CMake] Unspecified arguments to CMake script

David Cole david.cole at kitware.com
Tue Nov 27 18:16:13 EST 2012


It's possible, but it's probably not advisable.

The command line argument handling code in CMake is, shall we say, a smidge
on the fragile side.

It would be better to stream your arguments into a file, perhaps one arg
per line in a text file, and then use CMake's file reading capabilities to
process that file from within your script. And using -D to indicate the
filename to the CMake script...


HTH,
David



On Tue, Nov 27, 2012 at 5:31 PM, James Bigler <jamesbigler at gmail.com> wrote:

> Is it possible to have an unbounded number of arguments to a script
> processed by CMake using the -P argument?
>
> I need to specify a variable number of arguments, so using -D isn't going
> to help much.
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121127/42bf3df9/attachment-0001.htm>


More information about the CMake mailing list