From 5cf60186a241e84e8232641ee973395d4fde90e1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 18 Feb 2022 15:48:45 -0800 Subject: [PATCH] [vcpkg.cmake] Partially revert #23134 (#23176) --- scripts/buildsystems/vcpkg.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 8c964c6b7b..5a475b00f9 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -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}) @@ -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}")