|
Lines 221-226
function(geant4_export_package_variables _file)
Link Here
|
| 221 |
get_property(__var_value CACHE ${__var} PROPERTY VALUE) |
221 |
get_property(__var_value CACHE ${__var} PROPERTY VALUE) |
| 222 |
get_property(__var_type CACHE ${__var} PROPERTY TYPE) |
222 |
get_property(__var_type CACHE ${__var} PROPERTY TYPE) |
| 223 |
get_property(__var_help CACHE ${__var} PROPERTY HELPSTRING) |
223 |
get_property(__var_help CACHE ${__var} PROPERTY HELPSTRING) |
|
|
224 |
# Variable may not be in cache, only local (canonical case being EXPAT_LIBRARY since CMake 3.27) |
| 225 |
# We still need to account for these because they may be required to be in the CACHE at least set in |
| 226 |
# earlier versions. |
| 227 |
# 1. Variable may not be in cache, only local (canonical case being EXPAT_LIBRARY since CMake 3.27) |
| 228 |
# We still need to account for these because they may be required to be in the CACHE at least set in |
| 229 |
# earlier versions. |
| 230 |
# 2. Depending on CMake version, variable may be in cache but unitialized, here we want the local value |
| 231 |
if(((NOT __var_value) AND (NOT __var_type) AND (NOT __var_help)) OR (__var_type STREQUAL "UNINITIALIZED")) |
| 232 |
set(__var_value ${${__var}}) |
| 233 |
# TODO: set type based on whether it looks like a bool or path, but PATH almost invariably what we save |
| 234 |
# Only important in cmake GUI and if value needs to be changed, which we don't if package cache is used |
| 235 |
set(__var_type PATH) |
| 236 |
set(__var_help "no documentation, not a cache value") |
| 237 |
endif() |
| 238 |
|
| 224 |
list(APPEND __local_build_setting "geant4_set_and_check_package_variable(${__var} \"${__var_value}\" ${__var_type} \"${__var_help}\")") |
239 |
list(APPEND __local_build_setting "geant4_set_and_check_package_variable(${__var} \"${__var_value}\" ${__var_type} \"${__var_help}\")") |
| 225 |
endforeach() |
240 |
endforeach() |
| 226 |
|
241 |
|