File: 1351.patch

package info (click to toggle)
yaml-cpp 0.8.0%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,424 kB
  • sloc: cpp: 23,493; ansic: 956; python: 196; makefile: 47
file content (41 lines) | stat: -rw-r--r-- 1,581 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From a742115f601c3dfe51b478e2a8b88b7a42b8f1c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de>
Date: Mon, 24 Mar 2025 08:32:25 +0100
Subject: [PATCH 1/2] [cmake] Require minimum CMake version 3.5

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.
---
 CMakeLists.txt      | 6 +++---
 test/CMakeLists.txt | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e8a528d8..0df533a5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 1c60c07c5..6949d29c1 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -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)