[Cmake] Override default cache values

Brad King brad . king at kitware . com
Tue, 25 Nov 2003 15:01:48 -0500 (EST)


On Tue, 25 Nov 2003, Albert Strasheim wrote:

> Great! Your second solution does the trick.

Please note that the cache is used at the beginning of a configuration
pass to initialize the cmake variables of the same name.  What you see for
CMAKE_C_FLAGS in the CMakeCache.txt file is the default value that your
CMakeLists.txt file code will see.  If you do a

  SET(CMAKE_C_FLAGS "...")

then the build system will be generated using these flags instead of what
is in the cache.  This is useful to allow users to specify desired flags
and still add or replace flags in the listfile code if the project knows
better.

-Brad