[CMake] cmake-gui(beta) does not show a change in CMAKE_CXX_FLAGS

Bill Hoffman bill.hoffman at kitware.com
Tue Dec 2 08:41:50 EST 2008


Philip Lowman wrote:
> On Mon, Dec 1, 2008 at 3:39 PM, Bill Hoffman <bill.hoffman at kitware.com 
> <mailto:bill.hoffman at kitware.com>> wrote:
> 
> 
> 
> Has a FORCE_ONCE option ever been considered?  The idea would be to 
> allow the user to (as a one time operation) to force a cache value on 
> top of an already existing cache entry.  It would be useful for 
> appending options, for example.
> 

I suppose you could implement that with a function or macro.  It would 
have to set an internal variable with the name of the variable being set.

Something like this:

if(${var}_set_already )
   return()
set(${var}_set_already TRUE CACHE INTERNAL "")
set(${var} ${value}

I suppose it could be added to the set command.


-Bill


More information about the CMake mailing list