mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[baseline] unset the backup var and not the var which was backed up. (#27984)
* unset the backup var and not the var which was backed up. * if no backup unset the vcpkg set var
This commit is contained in:
parent
8b8196f0f8
commit
c2c25d916f
@ -833,8 +833,10 @@ macro("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}" z_vcpkg_find_package_package_name)
|
||||
foreach(z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_var IN LISTS z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_vars)
|
||||
if(DEFINED z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_${z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_var})
|
||||
set("${z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_var}" "${z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_${z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_var}}")
|
||||
endif()
|
||||
else()
|
||||
unset("${z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_var}")
|
||||
endif()
|
||||
unset("z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_${z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_var}")
|
||||
endforeach()
|
||||
math(EXPR z_vcpkg_find_package_backup_id "${z_vcpkg_find_package_backup_id} - 1")
|
||||
if(z_vcpkg_find_package_backup_id LESS "0")
|
||||
|
Loading…
x
Reference in New Issue
Block a user