Skip to content

Commit fb70b92

Browse files
committed
Enable Policy 138 instead of bumping cmake version
1 parent df4898c commit fb70b92

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Index.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
cmake_minimum_required(VERSION 3.24)
2-
# 3.24 is required to make CheckIPOSupported prefer to honor the calling project's flags, see https://cmake.org/cmake/help/latest/policy/CMP0138.html
1+
cmake_minimum_required(VERSION 3.20)
32
# 3.20 is required by the windows toolchain and cmake_path. It also has a more reliable building functionality.
43
# 3.18 required by package_project and interprocedural optimization. It also has a more reliable building functionality (no errors during the linking stage).
54

65
include_guard()
76

8-
# fix DOWNLOAD_EXTRACT_TIMESTAMP warning in FetchContent
97
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
8+
# fix DOWNLOAD_EXTRACT_TIMESTAMP warning in FetchContent
109
cmake_policy(SET CMP0135 NEW)
10+
# make CheckIPOSupported prefer to honor the calling project's flags
11+
cmake_policy(SET CMP0138 NEW)
1112
endif()
1213

1314
# only useable here

0 commit comments

Comments
 (0)