[CMake] Easier way to override variables

Romain LEGUAY romain.leguay at gmail.com
Wed Jul 18 09:49:31 EDT 2012


Hello everyone,

I don't find in any example to override a variable.

I proceed this way:

unset(MY_VAR CACHE)
set(MY_VAR MY_NEW_VALUE)

I have many variables so I would like to have just one line to change 
just the value of the variable (not its documentation) in one line like 
this:

set(MY_VAR MY_NEW_VALUE FORCED)

Is it possible?

Thank you,

Romain














More information about the CMake mailing list