Skip to content

Commit 2c1d31d

Browse files
committed
triton-common: add patch for CMake 4+ compatibility
Fix: | CMake Error at CMakeLists.txt:1 (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: Ilies CHERGUI <ichergui@nvidia.com>
1 parent 9517b02 commit 2c1d31d

2 files changed

Lines changed: 85 additions & 0 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
From bbd34b98a7dffc1b50582f15530763ae280c4de6 Mon Sep 17 00:00:00 2001
2+
From: Ilies CHERGUI <ichergui@nvidia.com>
3+
Date: Tue, 19 Aug 2025 13:52:28 +0100
4+
Subject: [PATCH 2/2] cmake: Set minimum required version to 3.5 for CMake 4+
5+
compatibility
6+
7+
Fix:
8+
9+
| CMake Error at CMakeLists.txt:1 (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+
21+
Upstream-Status: Inappropriate [OE-specific]
22+
Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com>
23+
---
24+
CMakeLists.txt | 2 +-
25+
protobuf/CMakeLists.txt | 2 +-
26+
src/test/CMakeLists.txt | 2 +-
27+
src/test/triton_json/CMakeLists.txt | 2 +-
28+
4 files changed, 4 insertions(+), 4 deletions(-)
29+
30+
diff --git a/CMakeLists.txt b/CMakeLists.txt
31+
index 95ed3f6..6946097 100644
32+
--- a/CMakeLists.txt
33+
+++ b/CMakeLists.txt
34+
@@ -24,7 +24,7 @@
35+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37+
38+
-cmake_minimum_required(VERSION 3.17)
39+
+cmake_minimum_required(VERSION 3.5)
40+
41+
project(tritoncommon LANGUAGES C CXX)
42+
43+
diff --git a/protobuf/CMakeLists.txt b/protobuf/CMakeLists.txt
44+
index 781a758..c5063ec 100644
45+
--- a/protobuf/CMakeLists.txt
46+
+++ b/protobuf/CMakeLists.txt
47+
@@ -24,7 +24,7 @@
48+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
49+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50+
51+
-cmake_minimum_required (VERSION 3.18)
52+
+cmake_minimum_required(VERSION 3.5)
53+
54+
set(protobuf_MODULE_COMPATIBLE TRUE CACHE BOOL "protobuf_MODULE_COMPATIBLE" FORCE)
55+
find_package(Protobuf REQUIRED)
56+
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
57+
index f5fd907..c0b3541 100644
58+
--- a/src/test/CMakeLists.txt
59+
+++ b/src/test/CMakeLists.txt
60+
@@ -24,7 +24,7 @@
61+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
62+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63+
64+
-cmake_minimum_required (VERSION 3.18)
65+
+cmake_minimum_required(VERSION 3.5)
66+
67+
find_package(GTest REQUIRED)
68+
69+
diff --git a/src/test/triton_json/CMakeLists.txt b/src/test/triton_json/CMakeLists.txt
70+
index 3ef9311..8ab4d90 100644
71+
--- a/src/test/triton_json/CMakeLists.txt
72+
+++ b/src/test/triton_json/CMakeLists.txt
73+
@@ -24,7 +24,7 @@
74+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
75+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
76+
77+
-cmake_minimum_required (VERSION 3.18)
78+
+cmake_minimum_required(VERSION 3.5)
79+
add_executable(triton-json-test triton_json_test.cc ../../error.cc)
80+
target_link_libraries(
81+
triton-json-test
82+
--
83+
2.34.1
84+

recipes-devtools/triton/triton-common_2.58.0.bb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SECTION = "libs"
66
SRC_URI = "\
77
git://github.com/triton-inference-server/common.git;protocol=https;branch=r25.05 \
88
file://0001-Build-fixups.patch \
9+
file://0002-cmake-Set-minimum-required-version-to-3.5-for-CMake-.patch \
910
"
1011

1112
SRCREV = "e4e00edd25af07d2f0e81e2025dbd40daa1dffc2"

0 commit comments

Comments
 (0)