mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 08:48:28 +08:00
[vcpkg] Fix incorrect setting of FEATURE_OPTIONS (#7158)
Setting a variable in PARENT_SCOPE will not make the variable also visible in current scope, which, as a result, causes FEATURE_OPTIONS to be set incorrectly.
This commit is contained in:
parent
4f6f7f8fbc
commit
1053d5b386
@ -94,12 +94,12 @@ function(vcpkg_check_features)
|
||||
|
||||
if(${_vcf_FEATURE} IN_LIST FEATURES)
|
||||
set(${_vcf_FEATURE_VAR} ON PARENT_SCOPE)
|
||||
list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=ON")
|
||||
else()
|
||||
set(${_vcf_FEATURE_VAR} OFF PARENT_SCOPE)
|
||||
list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=OFF")
|
||||
endif()
|
||||
|
||||
list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VAR}=${${_vcf_FEATURE_VAR}}")
|
||||
|
||||
set(_vcf_IS_FEATURE_ARG ON)
|
||||
endif()
|
||||
endforeach()
|
||||
|
Loading…
Reference in New Issue
Block a user