Skip to content

Commit 4966c12

Browse files
authored
Fix build warnings in CMake >= 3.24
1 parent d887a07 commit 4966c12

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
cmake_minimum_required(VERSION 3.14)
2-
cmake_policy(SET CMP0095 OLD) # RPATH escaping
2+
3+
# RPATH escaping (only in old CMake versions)
4+
if (CMAKE_VERSION VERSION_LESS "3.24.0")
5+
cmake_policy(SET CMP0095 OLD)
6+
endif()
7+
8+
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
9+
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
10+
cmake_policy(SET CMP0135 NEW)
11+
endif()
312

413
# Adapt compiler flags if using Conda compiler packages. Before project so they are not modified.
514
include(cmake/Conda.cmake)

0 commit comments

Comments
 (0)