[Cmake] Override default cache values

Albert Strasheim 13640887 at sun . ac . za
Tue, 25 Nov 2003 20:38:58 +0200


Hello,

As far as I can see, the values of variables such as CMAKE_C_FLAGS in 
CMakeCache.txt is determined by the values of the corresponding _INIT 
variables in the platform-specific cmake file.

Is there any way to override these initial values on a per-project basis? 

Specifying something like:

IF(CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_C_FLAGS "-Wall -O0 -std=c99")
ENDIF(CMAKE_COMPILER_IS_GNUCC)

in CMakeLists.txt always overrides the values in CMakeCache.txt. Instead, 
I would like to be able to set a default cache value, but still allow the 
user to modify said value by changing the cache