Hi,
We are using the ExternalProject macro to configure and build some
external (CMake-based) dependencies and we populate their cache by
providing a
CMAKE_ARGS
-Dproj_var:type=bla
argument to ExternalProject. If we now change the CMake option
"proj_var" in the external project itself (after it was successfully
configured via the ExternalProject call), a re-run of the
ExternalProject configure step overwrites the changed variable again.
The CMake documentation states that the arguments given to "-D" have
precedence over cache entries, so this behavior is expected.
In CMake 2.8.4, the ExternalProject macro gained a CMAKE_CACHE_ARGS
argument, which writes a cache file and invokes cmake with "-C
<cache_file>". However, the changed cache values are still overwritten
because the cache file contains "SET(proj_var ... FORCE)" entries.
Is there a known workaround to prevent overwriting changed variables in
external projects? Is the FORCE argument necessary in the created cache
file?
Thanks,
Sascha
_______________________________________________
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