summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Haase <Moritz.Haase@bmw.de>2025-07-11 12:00:20 +0200
committerKhem Raj <raj.khem@gmail.com>2025-07-11 08:35:04 -0700
commit4efbdb2d27436bf0d0fb2b28a7f09b2553e713dc (patch)
tree223026454cdd34c56e192561bc3f1f089d882680
parent26c61dfccd6cb64548fe1ac18da7710c6fa246cd (diff)
downloadmeta-openembedded-4efbdb2d27436bf0d0fb2b28a7f09b2553e713dc.tar.gz
cpputest: Backport patches to support builds with CMake 4+
There hasn't been a new upstream release yet that ships the required changes. Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-test/cpputest/cpputest/0001-Call-cmake_minimum_required-before-project-in-CMakeL.patch36
-rw-r--r--meta-oe/recipes-test/cpputest/cpputest/0002-Squelch-deprecation-warning.patch43
-rw-r--r--meta-oe/recipes-test/cpputest/cpputest_4.0.bb5
3 files changed, 83 insertions, 1 deletions
diff --git a/meta-oe/recipes-test/cpputest/cpputest/0001-Call-cmake_minimum_required-before-project-in-CMakeL.patch b/meta-oe/recipes-test/cpputest/cpputest/0001-Call-cmake_minimum_required-before-project-in-CMakeL.patch
new file mode 100644
index 0000000000..a987939ea6
--- /dev/null
+++ b/meta-oe/recipes-test/cpputest/cpputest/0001-Call-cmake_minimum_required-before-project-in-CMakeL.patch
@@ -0,0 +1,36 @@
1From 5351875cde23340c0a98fe46566cde5535c40e21 Mon Sep 17 00:00:00 2001
2From: georgev93 <georgeavogt93@gmail.com>
3Date: Fri, 26 Jun 2020 19:07:14 -0400
4Subject: [PATCH 1/2] Call cmake_minimum_required() before project() in
5 CMakeLists.txt.
6
7From https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html:
8Note: Call the cmake_minimum_required() command at the beginning of the top-level CMakeLists.txt file even before calling the project() command. It is important to establish version and policy settings before invoking other commands whose behavior they may affect. See also policy CMP0000.
9
10Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
11Upstream-Status: Backport [e0c050d8b614294b2215a62e64628470fab67f20]
12---
13 CMakeLists.txt | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index 88e0cfb5..d36c6491 100644
18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt
20@@ -1,12 +1,12 @@
21+# 2.6.3 is needed for ctest support
22+# 3.1 is needed for target_sources
23+cmake_minimum_required(VERSION 3.1)
24+
25 project(CppUTest)
26
27 set(CppUTest_version_major 4)
28 set(CppUTest_version_minor 0)
29
30-# 2.6.3 is needed for ctest support
31-# 3.1 is needed for target_sources
32-cmake_minimum_required(VERSION 3.1)
33-
34 ###############
35 # Conan support
36 ###############
diff --git a/meta-oe/recipes-test/cpputest/cpputest/0002-Squelch-deprecation-warning.patch b/meta-oe/recipes-test/cpputest/cpputest/0002-Squelch-deprecation-warning.patch
new file mode 100644
index 0000000000..6f791e4c0e
--- /dev/null
+++ b/meta-oe/recipes-test/cpputest/cpputest/0002-Squelch-deprecation-warning.patch
@@ -0,0 +1,43 @@
1From 46bdc8ceca42fd19cd2b97d9fa845860e537dee9 Mon Sep 17 00:00:00 2001
2From: Chad Condon <chad@condon.tech>
3Date: Fri, 27 Dec 2024 18:21:21 -0800
4Subject: [PATCH 2/2] Squelch deprecation warning
5
6Most recent CMake started complaining about the pending end of 3.8
7support.
8
9> ```
10> CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
11> Compatibility with CMake < 3.10 will be removed from a future version of
12> CMake.
13>
14> Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
15> to tell CMake that the project requires at least <min> but has been updated
16> to work with policies introduced by <max> or earlier.
17> ```
18
19We can retain support by adding a max version. This will no
20prevent use with newer versions, but indicates forward
21compatibility.[^1]
22
23[^1]: https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
24
25Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
26Upstream-Status: Backport [9dda473ded5913d47221e7ae50817dbcd45175ff]
27---
28 CMakeLists.txt | 3 ++-
29 1 file changed, 2 insertions(+), 1 deletion(-)
30
31diff --git a/CMakeLists.txt b/CMakeLists.txt
32index d36c6491..0cc12cb1 100644
33--- a/CMakeLists.txt
34+++ b/CMakeLists.txt
35@@ -1,6 +1,7 @@
36 # 2.6.3 is needed for ctest support
37 # 3.1 is needed for target_sources
38-cmake_minimum_required(VERSION 3.1)
39+# 3.8 is needed for try_compile improvements (CMP0067)
40+cmake_minimum_required(VERSION 3.8...3.31)
41
42 project(CppUTest)
43
diff --git a/meta-oe/recipes-test/cpputest/cpputest_4.0.bb b/meta-oe/recipes-test/cpputest/cpputest_4.0.bb
index 5710585b6c..2b643d0cd5 100644
--- a/meta-oe/recipes-test/cpputest/cpputest_4.0.bb
+++ b/meta-oe/recipes-test/cpputest/cpputest_4.0.bb
@@ -5,7 +5,10 @@ SECTION = "devel"
5LICENSE = "BSD-3-Clause" 5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://COPYING;md5=ce5d5f1fe02bcd1343ced64a06fd4177" 6LIC_FILES_CHKSUM = "file://COPYING;md5=ce5d5f1fe02bcd1343ced64a06fd4177"
7 7
8SRC_URI = "git://github.com/cpputest/cpputest.git;protocol=https;branch=master" 8SRC_URI = "git://github.com/cpputest/cpputest.git;protocol=https;branch=master \
9 file://0001-Call-cmake_minimum_required-before-project-in-CMakeL.patch \
10 file://0002-Squelch-deprecation-warning.patch \
11"
9SRCREV = "67d2dfd41e13f09ff218aa08e2d35f1c32f032a1" 12SRCREV = "67d2dfd41e13f09ff218aa08e2d35f1c32f032a1"
10 13
11 14