[cmake-developers] cmake.exe parameters and system command line length limit

David Cole DLRdave at aol.com
Mon Jul 13 13:56:09 EDT 2015


You could use the -C command line option to pass in the name of a file
containing initial cache values. See the "-C <initial-cache>" section
at the top of this documentation section:

    http://www.cmake.org/cmake/help/v3.3/manual/cmake.1.html#options

The format of the file is just a bunch of set(... CACHE ...) commands.
Read the doc paragraph carefully, and give it a try. Maybe somebody
else can point to a valid example of a live -C file being used out
there on the Internet.


HTH,
David C.



On Mon, Jul 13, 2015 at 1:44 PM, Robert Goulet
<Robert.Goulet at autodesk.com> wrote:
> Hi all,
>
>
>
> We use a custom script to handle which parameters we set to cmake.exe on
> Windows. It sets CMake values based on the options provided to this script,
> using the -D cmake parameter. This works well, but recently we’ve reached
> the limit on how many characters we can set to a single system command line
> (cmd.exe), because our number of options is growing.
>
>
>
> Is there a work-around for this using CMake, or perhaps feed CMake
> parameters from a file rather than from command-line parameters? i.e.
> “cmake.exe < params.txt” ?
>
>
>
> Thanks!
>
>
> --
>
> 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/mailman/listinfo/cmake-developers


More information about the cmake-developers mailing list