diff mbox series

[meta-openembedded,06/20] p8platform: Add patch for CMake 4+ compatibility

Message ID 20250709173054.605430-6-alperyasinak1@gmail.com
State Under Review
Headers show
Series [meta-openembedded,01/20] librdkafka: Upgrade 1.8.2 -> 2.11.0 to allow CMake 4+ compatibility | expand

Commit Message

Alper Ak July 9, 2025, 5:30 p.m. UTC
Fix:

| CMake Error at CMakeLists.txt:3 (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>
---
 .../0001-allow-build-with-cmake-4.patch       | 42 +++++++++++++++++++
 .../p8platform/p8platform_git.bb              |  5 ++-
 2 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-extended/p8platform/p8platform/0001-allow-build-with-cmake-4.patch

Comments

Gyorgy Sarvari July 9, 2025, 6:40 p.m. UTC | #1
On 7/9/25 19:30, Alper Ak via lists.openembedded.org wrote:
> --- a/meta-oe/recipes-extended/p8platform/p8platform_git.bb
> +++ b/meta-oe/recipes-extended/p8platform/p8platform_git.bb
> @@ -6,9 +6,10 @@ LIC_FILES_CHKSUM = "file://src/os.h;md5=752555fa94e82005d45fd201fee5bd33"
>  
>  PV = "2.1.0.1+git"
>  
> -SRC_URI = "git://github.com/Pulse-Eight/platform.git;branch=master;protocol=https"
> -SRCREV = "a7cd0d5780ed80a4e70480d1650749f29e8a1fb2"
> +SRC_URI = "git://github.com/Pulse-Eight/platform.git;branch=master;protocol=https \
> +        file://0001-allow-build-with-cmake-4.patch"
>  
> +SRCREV = "a7cd0d5780ed80a4e70480d1650749f29e8a1fb2"
>  
>
This is also 5 years old revision - but this project seems to be fairly
slowly moving nowadays. There weren't too many commits since - maybe it
could be just bumped to the latest revision instead of a patch?
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/p8platform/p8platform/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-extended/p8platform/p8platform/0001-allow-build-with-cmake-4.patch
new file mode 100644
index 0000000000..cb49cf3624
--- /dev/null
+++ b/meta-oe/recipes-extended/p8platform/p8platform/0001-allow-build-with-cmake-4.patch
@@ -0,0 +1,42 @@ 
+From 0cfe5772f35d067cb10daf3c66b7fe5f3901f260 Mon Sep 17 00:00:00 2001
+From: Alper Ak <alperyasinak1@gmail.com>
+Date: Wed, 9 Jul 2025 11:47:58 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix:
+
+| CMake Error at CMakeLists.txt:3 (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!
+
+Upstream-Status: Backport [https://github.com/Pulse-Eight/platform/commit/d7faed1c696b1a6a67f114a63a0f4c085f0f9195]
+
+Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f5b2ff8..b7cf077 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ project(p8-platform)
+ 
+-cmake_minimum_required(VERSION 2.8.9)
++cmake_minimum_required(VERSION 3.5)
+ enable_language(CXX)
+ 
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
+-- 
+2.43.0
+
diff --git a/meta-oe/recipes-extended/p8platform/p8platform_git.bb b/meta-oe/recipes-extended/p8platform/p8platform_git.bb
index e69d544b66..e7af1c7298 100644
--- a/meta-oe/recipes-extended/p8platform/p8platform_git.bb
+++ b/meta-oe/recipes-extended/p8platform/p8platform_git.bb
@@ -6,9 +6,10 @@  LIC_FILES_CHKSUM = "file://src/os.h;md5=752555fa94e82005d45fd201fee5bd33"
 
 PV = "2.1.0.1+git"
 
-SRC_URI = "git://github.com/Pulse-Eight/platform.git;branch=master;protocol=https"
-SRCREV = "a7cd0d5780ed80a4e70480d1650749f29e8a1fb2"
+SRC_URI = "git://github.com/Pulse-Eight/platform.git;branch=master;protocol=https \
+        file://0001-allow-build-with-cmake-4.patch"
 
+SRCREV = "a7cd0d5780ed80a4e70480d1650749f29e8a1fb2"
 
 inherit cmake pkgconfig