[CMake] Advanced set(... CACHE ...)

Gustaw Smolarczyk wielkiegie at gmail.com
Sun Mar 22 07:31:03 EDT 2009


Hi

I want to use set(... CACHE ...) to make a cached variable I can
change with cmake-gui/changing CMakeCache.txt. This is simple, but not
as powerful as I require. Some options should be visible in gui only
if another one is enabled. Example:

set(SomeVar FALSE CACHE BOOL "If SomeVar is enabled")
set(SomethingThatDependsOnSomeVar "none" CACHE STRING "Depends on
'SomeVar = TRUE'")

Is that possible with current or future version of CMake?


More information about the CMake mailing list