From 2d7a3b9b6a7c7ef0d651d866b4ab11fb1ea24664 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 16 Nov 2024 21:26:55 +0000 Subject: [PATCH 1/2] cmake: Update minimum required version Compatibility with versions of CMake older than 3.10 is now deprecated and will be removed from a future version. See: https://cmake.org/cmake/help/v3.31/release/3.31.html --- CMakeLists.txt | 2 +- test-export/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25578930..04e6933b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ # start libevent.sln # -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) if (POLICY CMP0042) cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. diff --git a/test-export/CMakeLists.txt b/test-export/CMakeLists.txt index 115b09e9..f83d24c9 100644 --- a/test-export/CMakeLists.txt +++ b/test-export/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) if (POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() From e36398f137d566b3acdcc00a7069c23d4c41c384 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 16 Nov 2024 21:35:53 +0000 Subject: [PATCH 2/2] cmake: Remove redundant policy settings The `cmake_minimum_required(VERSION 3.10)` command implicitly sets the following policies to NEW by default: - CMP0042 (introduced in CMake 3.0) - CMP0054 (introduced in CMake 3.1) - CMP0068 (introduced in CMake 3.9) --- CMakeLists.txt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04e6933b..16c126be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,15 +21,6 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR) -if (POLICY CMP0042) - cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. -endif() -if (POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -endif() -if (POLICY CMP0068) - cmake_policy(SET CMP0068 NEW) # RPATH settings on macOS do not affect install_name. -endif() if (POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif()