[Cmake] Override default cache values

Amitha Perera perera at cs . rpi . edu
Tue, 25 Nov 2003 14:37:14 -0500


As a hack, perhaps you could check if the current value is the same as
the _INIT value, and override only in that case.

Or, (untested)
IF( NOT MY_PROJ_RESET_DEFAULTS )
  SET( CMAKE_C_FLAGS "..." CACHE STRING "Project default" FORCE )
  SET( MY_PROJ_RESET_DEFAULTS 1 CACHE INTERNAL "Defaults written" FORCE )
ENDIF( NOT MY_PROJ_RESET_DEFAULTS )

Cheers,
Amitha.