cmake: Unset CACHE variables from the CACHE

These variables were meant to be removed from the cache
This commit is contained in:
Adrian Danis 2017-10-27 12:04:27 +11:00
parent 777f19645b
commit 3a48b9fa33

View file

@ -270,7 +270,7 @@ function(config_string optionname configname doc)
set(force "")
if(${optionname}_UNAVAILABLE)
set(force "FORCE")
unset(${optionname}_UNAVAILABLE)
unset(${optionname}_UNAVAILABLE CACHE)
endif()
set(${optionname} "${CONFIG_DEFAULT}" CACHE STRING "${doc}" ${force})
list(APPEND local_config_string
@ -278,7 +278,7 @@ function(config_string optionname configname doc)
)
else()
if(CONFIG_UNDEF_DISABLED)
unset(${optionname})
unset(${optionname} CACHE)
else()
# Forcively change the value to its disabled_value
set(${optionname} "${CONFIG_DEFAULT_DISABLED}" CACHE INTERNAL "")