summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlper Ak <alperyasinak1@gmail.com>2025-07-08 22:56:27 +0300
committerKhem Raj <raj.khem@gmail.com>2025-07-09 09:16:07 -0700
commite07430eb449c6b89ec486624f4c332b3ecd46352 (patch)
tree4b5384b055442479341357fc850e521fc20a97ab
parentc3282bbe64f009225bb14803c4a755199f51d2d9 (diff)
downloadmeta-openembedded-e07430eb449c6b89ec486624f4c332b3ecd46352.tar.gz
gflags: Add patch for CMake 4+ compatibility
Fix: | CMake Error at CMakeLists.txt:73 (cmake_minimum_required): | Compatibility with CMake < 3.5 has been removed from CMake. | | Update the VERSION argument <min> value. Or, use the <min>...<max> syntax | to tell CMake that the project requires at least <min> but has been updated | to work with policies introduced by <max> or earlier. | | Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. | | | -- Configuring incomplete, errors occurred! Signed-off-by: Alper Ak <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/gflags/gflags/0001-allow-build-with-cmake-4.patch69
-rw-r--r--meta-oe/recipes-support/gflags/gflags_2.2.2.bb4
2 files changed, 71 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/gflags/gflags/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-support/gflags/gflags/0001-allow-build-with-cmake-4.patch
new file mode 100644
index 0000000000..bc3ca94de8
--- /dev/null
+++ b/meta-oe/recipes-support/gflags/gflags/0001-allow-build-with-cmake-4.patch
@@ -0,0 +1,69 @@
1From b533cf275db99b1d37ba20d96497cafcedc9ace0 Mon Sep 17 00:00:00 2001
2From: Alper Ak <alperyasinak1@gmail.com>
3Date: Tue, 8 Jul 2025 18:57:26 +0300
4Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
5 compatibility
6
7Fix:
8
9| CMake Error at CMakeLists.txt:73 (cmake_minimum_required):
10| Compatibility with CMake < 3.5 has been removed from CMake.
11|
12| Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
13| to tell CMake that the project requires at least <min> but has been updated
14| to work with policies introduced by <max> or earlier.
15|
16| Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
17|
18|
19| -- Configuring incomplete, errors occurred!
20
21Upstream-Status: Backport [https://github.com/gflags/gflags/commit/70c01a642f08734b7bddc9687884844ca117e080]
22
23Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
24---
25 CMakeLists.txt | 2 +-
26 test/config/CMakeLists.txt | 2 +-
27 test/nc/CMakeLists.txt | 2 +-
28 3 files changed, 3 insertions(+), 3 deletions(-)
29
30diff --git a/CMakeLists.txt b/CMakeLists.txt
31index 657a1f4..a5440bb 100644
32--- a/CMakeLists.txt
33+++ b/CMakeLists.txt
34@@ -70,7 +70,7 @@
35 ## - GFLAGS_INSTALL_SHARED_LIBS
36 ## - GFLAGS_INSTALL_STATIC_LIBS
37
38-cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)
39+cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
40
41 if (POLICY CMP0042)
42 cmake_policy (SET CMP0042 NEW)
43diff --git a/test/config/CMakeLists.txt b/test/config/CMakeLists.txt
44index 6190b25..205121e 100644
45--- a/test/config/CMakeLists.txt
46+++ b/test/config/CMakeLists.txt
47@@ -1,6 +1,6 @@
48 ## gflags package configuration tests
49
50-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
51+cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
52
53 project (gflags_${TEST_NAME})
54
55diff --git a/test/nc/CMakeLists.txt b/test/nc/CMakeLists.txt
56index d00b07d..1b4d511 100644
57--- a/test/nc/CMakeLists.txt
58+++ b/test/nc/CMakeLists.txt
59@@ -1,6 +1,6 @@
60 ## gflags negative compilation tests
61
62-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
63+cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
64
65 if (NOT TEST_NAME)
66 message (FATAL_ERROR "Missing TEST_NAME CMake flag")
67--
682.43.0
69
diff --git a/meta-oe/recipes-support/gflags/gflags_2.2.2.bb b/meta-oe/recipes-support/gflags/gflags_2.2.2.bb
index 8ea158eab3..925aa6d6e6 100644
--- a/meta-oe/recipes-support/gflags/gflags_2.2.2.bb
+++ b/meta-oe/recipes-support/gflags/gflags_2.2.2.bb
@@ -3,10 +3,10 @@ HOMEPAGE = "https://github.com/gflags/gflags"
3LICENSE = "BSD-3-Clause" 3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://COPYING.txt;md5=c80d1a3b623f72bb85a4c75b556551df" 4LIC_FILES_CHKSUM = "file://COPYING.txt;md5=c80d1a3b623f72bb85a4c75b556551df"
5 5
6SRC_URI = "git://github.com/gflags/gflags.git;branch=master;protocol=https" 6SRC_URI = "git://github.com/gflags/gflags.git;branch=master;protocol=https \
7 file://0001-allow-build-with-cmake-4.patch"
7SRCREV = "e171aa2d15ed9eb17054558e0b3a6a413bb01067" 8SRCREV = "e171aa2d15ed9eb17054558e0b3a6a413bb01067"
8 9
9
10inherit cmake 10inherit cmake
11 11
12EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DREGISTER_INSTALL_PREFIX=OFF -DLIB_INSTALL_DIR=${baselib}" 12EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DREGISTER_INSTALL_PREFIX=OFF -DLIB_INSTALL_DIR=${baselib}"