mirror of
https://github.com/seL4/seL4.git
synced 2026-04-09 08:49:54 +00:00
cmake: Make variables show up if previously hidden
Previously if a variable had unmet dependencies and had been hidden, by being made an internal variable, it would not have been unhidden by the use of `option`. This emulates the behaviour of `option` that we were wanting, but additionally using `FORCE` to override the `INTERNAL` setting
This commit is contained in:
@@ -191,7 +191,12 @@ function(config_option optionname configname doc)
|
||||
endforeach()
|
||||
endif()
|
||||
if(valid)
|
||||
option(${optionname} "${doc}" ${CONFIG_DEFAULT})
|
||||
# Check for an existing value, and set the option to that, otherwise use the default
|
||||
if(DEFINED ${optionname})
|
||||
set(${optionname} "${${optionname}}" CACHE BOOL "${doc}" FORCE)
|
||||
else()
|
||||
set(${optionname} "${CONFIG_DEFAULT}" CACHE BOOL "${doc}" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set(${optionname} "${CONFIG_DEFAULT_DISABLED}" CACHE INTERNAL "${doc}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user