dlt-daemon: Add patch for CMake 4+ compatibility

Fix:

| CMake Error at CMakeLists.txt:17 (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>
This commit is contained in:
Alper Ak 2025-07-09 20:30:49 +03:00 committed by Khem Raj
parent 38c37d867c
commit fea7800935
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,99 @@
From ae23f2cccc169874d89903cad24bf36e19bef659 Mon Sep 17 00:00:00 2001
From: Alper Ak <alperyasinak1@gmail.com>
Date: Wed, 9 Jul 2025 18:18:33 +0300
Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
compatibility
Fix:
| CMake Error at CMakeLists.txt:17 (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: Submitted [https://github.com/COVESA/dlt-daemon/pull/755]
Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
CMakeLists.txt | 2 +-
examples/example1/CMakeLists.txt | 2 +-
examples/example2/CMakeLists.txt | 2 +-
examples/example3/CMakeLists.txt | 2 +-
examples/example4/CMakeLists.txt | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94185b8..2a0f619 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
#######
# Set minimum Cmake version and setup policy behavior
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.5)
if(${CMAKE_VERSION} VERSION_GREATER "3.20" OR ${CMAKE_VERSION} VERSION_EQUAL "3.20")
cmake_policy(SET CMP0115 OLD)
diff --git a/examples/example1/CMakeLists.txt b/examples/example1/CMakeLists.txt
index 60644a1..44cd053 100644
--- a/examples/example1/CMakeLists.txt
+++ b/examples/example1/CMakeLists.txt
@@ -17,7 +17,7 @@
# DLT example implementation
#
-cmake_minimum_required( VERSION 2.6 )
+cmake_minimum_required( VERSION 3.5 )
project( automotive-dlt-example1 )
#
diff --git a/examples/example2/CMakeLists.txt b/examples/example2/CMakeLists.txt
index 66a4f24..a8efbcf 100644
--- a/examples/example2/CMakeLists.txt
+++ b/examples/example2/CMakeLists.txt
@@ -17,7 +17,7 @@
# DLT example implementation
#
-cmake_minimum_required( VERSION 2.6 )
+cmake_minimum_required( VERSION 3.5 )
project( automotive-dlt-example2 )
#
diff --git a/examples/example3/CMakeLists.txt b/examples/example3/CMakeLists.txt
index 45b7467..4d4958d 100644
--- a/examples/example3/CMakeLists.txt
+++ b/examples/example3/CMakeLists.txt
@@ -17,7 +17,7 @@
# DLT example implementation
#
-cmake_minimum_required( VERSION 2.6 )
+cmake_minimum_required( VERSION 3.5 )
project( automotive-dlt-example3 )
#
diff --git a/examples/example4/CMakeLists.txt b/examples/example4/CMakeLists.txt
index 53a4fad..161c333 100644
--- a/examples/example4/CMakeLists.txt
+++ b/examples/example4/CMakeLists.txt
@@ -17,7 +17,7 @@
# DLT example implementation
#
-cmake_minimum_required( VERSION 2.6 )
+cmake_minimum_required( VERSION 3.5 )
project( automotive-dlt-example4 )
#
--
2.43.0

View File

@ -20,6 +20,7 @@ SRC_URI = "git://github.com/COVESA/${BPN}.git;protocol=https;branch=master \
file://544.patch \
file://567.patch \
file://0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch \
file://0003-allow-build-with-cmake-4.patch \
"
SRCREV = "0f2d4cfffada6f8448a2cb27995b38eb4271044f"