On 10/16/2014 11:26 AM, Daniele E. Domenichelli wrote: > # [CMAKE_ARGS args...] # Arguments to CMake command line > # [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form > -Dvar:string=on > > So, from what I understand, The first arguments are passed to the cmake > command line, and from the second it is created a a cache file that is > passed to cmake using -C. If the same variable is in both, CMAKE_ARGS > wins over CMAKE_CACHE_ARGS. [snip] > This makes impossible to change a value later, and in my opinion makes > one of the 2 arguments redundant, since the final effect of the 2 > variables is exactly the same.
CMAKE_CACHE_ARGS was added here: Added CMAKE_CACHE_ARGS to ExternalProject. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68cd3fe0 to overcome command line length limits. CMAKE_ARGS can contain arguments other than cache values. Therefore they are not fully redundant although there is overlap. The name "initial cache" is poor both here and for the -C argument to cmake because the option can be used any time. It just happened to originate for purposes of pre-populating some cache values on the first run. If you'd like, please propose clearer wording for the docs. Thanks, -Brad -- 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
