Skip to content

Commit

Permalink
[vcpkg.cmake] Partially revert microsoft#23134 (microsoft#23176)
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft authored Feb 18, 2022
1 parent b313875 commit 5cf6018
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/buildsystems/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,10 @@ foreach(Z_VCPKG_TOOLS_DIR IN LISTS Z_VCPKG_TOOLS_DIRS)
endif()
endforeach()

cmake_policy(POP)

# Any policies applied to the below macros and functions appear to leak into consumers

function(add_executable)
z_vcpkg_function_arguments(ARGS)
_add_executable(${ARGS})
Expand Down Expand Up @@ -787,6 +791,9 @@ macro("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}" z_vcpkg_find_package_package_name)
endforeach()
endmacro()

cmake_policy(PUSH)
cmake_policy(VERSION 3.7.2)

set(VCPKG_TOOLCHAIN ON)
set(Z_VCPKG_UNUSED "${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}")
set(Z_VCPKG_UNUSED "${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}")
Expand Down

0 comments on commit 5cf6018

Please sign in to comment.