[vcpkg scripts] CMake Deprecation warning for policies <3.10 #42065
Labels
category:tool-update
The issue is with build tool or build script, which requires update or should be executed correctly
Describe the bug
vcpkg sets the cmake policy version to 3.7.2 on lines 40 and 878 of scripts/buildsystems/vcpkg.cmake
CMake 3.31 has deprecated policy versions <3.10 and will be removing them in the future, the correct mechanism here is to add a max version to the
cmake_policy()
call to indicate that vcpkg doesn't actually rely on these deprecated policy behaviors. Ideally this would be set to a modern version of CMake, but it is sufficient to set it to 3.10, iecmake_policy(VERSION 3.7.2...3.10)
This is unrelated to the policy 0174 issue in #41999.
Full Disclosure: I'm a Kitware employee, happy to answer questions
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No warnings for deprecated
cmake_policy()
levelsFailure logs
The text was updated successfully, but these errors were encountered: