已开启
fix build with cmake 4 #7
Funda Wang创建于 2025年8月22日
fix build with cmake 4 #7
已开启
Funda Wang创建于 2025年8月22日
refs/pull/7/head合入到master
2 个文件变更+39-2
@@ -0,0 +1,33 @@
1+From af5f033fbe71da454953e04db9804443e2cec746 Mon Sep 17 00:00:00 2001
2+From: John Machado <john.machado@intel.com>
3+Date: Tue, 20 May 2025 19:54:35 +0530
4+Subject: [PATCH] Update Cmake minimum version to 3.5 (#238)
5+ 
6+---
7+ CMakeLists.txt | 2 +-
8+ Source/GmmLib/os_release_info.cmake | 2 +-
9+ 2 files changed, 2 insertions(+), 2 deletions(-)
10+ 
11+diff --git a/CMakeLists.txt b/CMakeLists.txt
12+index 1a3ad36d..630d285f 100644
13+--- a/CMakeLists.txt
14++++ b/CMakeLists.txt
15+@@ -1,4 +1,4 @@
16+-cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
17++cmake_minimum_required (VERSION 3.5)
18+
19+ if (NOT DEFINED RUN_TEST_SUITE)
20+ option (RUN_TEST_SUITE "run test suite after install" ON)
21+diff --git a/Source/GmmLib/os_release_info.cmake b/Source/GmmLib/os_release_info.cmake
22+index 70c83186..0951a4a3 100755
23+--- a/Source/GmmLib/os_release_info.cmake
24++++ b/Source/GmmLib/os_release_info.cmake
25+@@ -28,7 +28,7 @@ if(NOT DEFINED _os_release_info)
26+ set(_os_release_info TRUE)
27+
28+ # Set cmake policies for at least this level:
29+-cmake_minimum_required(VERSION 2.8.12)
30++cmake_minimum_required(VERSION 3.5)
31+
32+ if(POLICY CMP0054)
33+ cmake_policy(SET CMP0054 NEW)
@@ -4,7 +4,7 @@
4%undefine __cmake_in_source_build4%undefine __cmake_in_source_build
5%global pkg_name intel-gmmlib5%global pkg_name intel-gmmlib
6%global lib_ver 22.3.106%global lib_ver 22.3.10
7-%global openeuler_release 27+%global openeuler_release 3
8 8 
9Name: %{pkg_name}9Name: %{pkg_name}
10Version: %{lib_ver}10Version: %{lib_ver}
@@ -13,6 +13,7 @@ Summary: Intel Graphics Memory Management Library
13License: MIT13License: MIT
14URL: https://github.com/intel/gmmlib14URL: https://github.com/intel/gmmlib
15Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz15Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
16+Patch0: backport-Update-Cmake-minimum-version.patch
16 17 
17# This package relies on intel asm18# This package relies on intel asm
18ExclusiveArch: x86_6419ExclusiveArch: x86_64
@@ -36,7 +37,7 @@ The %{name}-devel package contains libraries and header files for
36developing applications that use %{name}.37developing applications that use %{name}.
37 38 
38%prep39%prep
39-%autosetup -n gmmlib-%{name}-%{version}40+%autosetup -p1 -n gmmlib-%{name}-%{version}
40 41 
41%build42%build
42%cmake \43%cmake \
@@ -59,6 +60,9 @@ developing applications that use %{name}.
59%{_libdir}/pkgconfig/igdgmm.pc60%{_libdir}/pkgconfig/igdgmm.pc
60 61 
61%changelog62%changelog
63+* Fri Aug 22 2025 Funda Wang <fundawang@yeah.net> - 22.3.10-3
64+- fix build with cmake 4
65+ 
62* Thu Dec 05 2024 Funda Wang <fundawang@yeah.net> - 22.3.10-266* Thu Dec 05 2024 Funda Wang <fundawang@yeah.net> - 22.3.10-2
63- adopt to new cmake macro67- adopt to new cmake macro
64 68