You don't. It's just another way to specify the command line arguments, but as a single command line argument instead of dozens or hundreds.
It's a mechanism for you to avoid the command line length limit. Wasn't that your question...? On Mon, Jul 13, 2015 at 2:01 PM, Robert Goulet <robert.gou...@autodesk.com> wrote: > Hi David, > > That option looks interesting. How do we populate it with the other CMake > cache values that are originally set by CMake and not by our command line > options? > > Thanks. > > -----Original Message----- > From: David Cole [mailto:dlrd...@aol.com] > Sent: Monday, July 13, 2015 1:56 PM > To: Robert Goulet > Cc: cmake-developers@cmake.org > Subject: Re: [cmake-developers] cmake.exe parameters and system command line > length limit > > 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.gou...@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 -- 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