[PATCH 1/2] [cmake] Require minimum CMake version 3.5
authorChristoph GrĂ¼ninger <foss@grueninger.de>
Mon, 24 Mar 2025 07:32:25 +0000 (08:32 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Fri, 3 Oct 2025 15:35:05 +0000 (17:35 +0200)
Soon CMake 4.0 will be released. It requires that projects
set a minimum required CMake version of 3.5. There is a
workaround with an additional flag, but it would is better
to increase the minimum required version.

Gbp-Pq: Name 1351.patch

CMakeLists.txt
test/CMakeLists.txt

index a052e17e4e735ee60dc23dda7e494833000da970..03cd7a1e149f871e0e94104b29e0745d6cc55ac0 100644 (file)
@@ -1,6 +1,6 @@
-# 3.5 is actually available almost everywhere, but this a good minimum.
-# 3.14 as the upper policy limit avoids CMake deprecation warnings.
-cmake_minimum_required(VERSION 3.4...3.14)
+# 3.5 is actually available almost everywhere.
+# 3.30 as the upper policy limit avoids CMake deprecation warnings.
+cmake_minimum_required(VERSION 3.5...3.30)
 
 # enable MSVC_RUNTIME_LIBRARY target property
 # see https://cmake.org/cmake/help/latest/policy/CMP0091.html
index 1c60c07c556f760ab368d26fd0f5963f3908058e..6949d29c13e8b05372a4ddefa20b6ae4795235ee 100644 (file)
@@ -3,7 +3,6 @@ find_package(Threads REQUIRED)
 set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
 set(BUILD_MOCK ON CACHE BOOL "" FORCE)
 set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
-set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
 
 if(YAML_USE_SYSTEM_GTEST)
   find_package(GTest)