diff options
| author | myd7349 <myd7349@gmail.com> | 2019-07-07 15:33:46 +0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-07-07 00:33:46 -0700 |
| commit | 1053d5b386778536b64a42afd1198e91581721bc (patch) | |
| tree | 0840e5e08af02298e04b261c4d85c7d2b32fd95c /scripts/cmake/vcpkg_check_features.cmake | |
| parent | 4f6f7f8fbcd48c8d152b6192d08547ed0e5a699c (diff) | |
| download | vcpkg-1053d5b386778536b64a42afd1198e91581721bc.tar.gz vcpkg-1053d5b386778536b64a42afd1198e91581721bc.zip | |
[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.
Diffstat (limited to 'scripts/cmake/vcpkg_check_features.cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_check_features.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/cmake/vcpkg_check_features.cmake b/scripts/cmake/vcpkg_check_features.cmake index 115b1501f..d089ac5b1 100644 --- a/scripts/cmake/vcpkg_check_features.cmake +++ b/scripts/cmake/vcpkg_check_features.cmake @@ -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() |
