Skip to content

Commit f0bf16d

Browse files
committed
[CMake] Set the minimum required version to 3.23
This version of CMake was released in March 2022 https://github.com/Kitware/CMake/releases/tag/v3.23.0 This version is required to use FILE_SETs, which could help towards #16327 and #18419. Since cmake_minimum_required updates the cmake_policy from 3.20 to 3.23, we need to take care of a change that happened from 3.20 to 3.21 that leads to an error in the CheckCompiler CMake module, so set the proper policy flag to old to avoid that error on some platforms.
1 parent 33f0cd1 commit f0bf16d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# For the licensing terms see $ROOTSYS/LICENSE.
55
# For the list of contributors see $ROOTSYS/README/CREDITS.
66

7-
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
7+
cmake_minimum_required(VERSION 3.23 FATAL_ERROR)
88

99
if(WIN32)
1010
# Set CMP0091 (MSVC runtime library flags are selected by an abstraction) to OLD
@@ -61,7 +61,7 @@ foreach(policy ${policy_new})
6161
endif()
6262
endforeach()
6363

64-
set(policy_old CMP0116 CMP0135 CMP0144)
64+
set(policy_old CMP0116 CMP0126 CMP0135 CMP0144)
6565
foreach(policy ${policy_old})
6666
if(POLICY ${policy})
6767
cmake_policy(SET ${policy} OLD)

0 commit comments

Comments
 (0)