From d228a1cf208fc7381188ba5f88a87f3cb1b2cefd Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 5 May 2026 11:39:36 +0200 Subject: [PATCH] [CMake] Update two CMake policies to NEW. The two policies in question should not affect ROOT: - ROOT does not use _ROOT for purposes other than finding a package, so the NEW version of the policy is fine. - And it is preferable to update the timestamps of files extracted from an archive if the URL changes (NEW) as opposed to keeping the timestamps found in the archive (OLD). --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b092fe9f969b..af2d4c1d0d24c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,8 @@ foreach(directoryName IN ITEMS ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_I endforeach() set(policy_new CMP0072 CMP0076 CMP0077 CMP0079 + CMP0135 # Timestamps of downloaded archives are set to time of extraction + CMP0144 # _ROOT (converted to upper case) can be used to search for dependencies CMP0156 CMP0179 #deduplicate static libraries when linker supports it ) foreach(policy ${policy_new}) @@ -40,7 +42,7 @@ foreach(policy ${policy_new}) endif() endforeach() -set(policy_old CMP0116 CMP0135 CMP0144) +set(policy_old CMP0116) foreach(policy ${policy_old}) if(POLICY ${policy}) cmake_policy(SET ${policy} OLD)