projects/aports·blob master · refs

96 lines · 3.2 KiB

1From: https://github.com/ceph/ceph/pull/63795
2
3From 8886bdd95387bba8c9fcfe0e2550c5eb430d2a69 Mon Sep 17 00:00:00 2001
4From: Kefu Chai <[email protected]>
5Date: Fri, 13 Jun 2025 16:20:10 +0800
6Subject: [PATCH 1/2] cmake: drop c-ares::c-ares alias
7
8Remove the c-ares::c-ares alias that was causing build failures after
9bumping the minimum CMake version:
10
11```
12CMake Error at cmake/modules/Findc-ares.cmake:34 (add_library):
13 add_library cannot create ALIAS target "c-ares::c-ares" because another
14 target with the same name already exists.
15Call Stack (most recent call first):
16 src/CMakeLists.txt:463 (_find_package)
17 src/seastar/cmake/SeastarDependencies.cmake:136 (find_package)
18 src/seastar/CMakeLists.txt:395 (seastar_find_dependencies)`
19```
20
21The alias was originally added for backward compatibility with Seastar,
22but is no longer needed since the updated Seastar submodule no longer
23references the c-ares::c-ares target.
24
25Signed-off-by: Kefu Chai <[email protected]>
26---
27 cmake/modules/Findc-ares.cmake | 3 ---
28 1 file changed, 3 deletions(-)
29
30diff --git a/cmake/modules/Findc-ares.cmake b/cmake/modules/Findc-ares.cmake
31index 93554ed281460..0e4fcd580127f 100644
32--- a/cmake/modules/Findc-ares.cmake
33+++ b/cmake/modules/Findc-ares.cmake
34@@ -30,9 +30,6 @@ if(c-ares_FOUND)
35 IMPORTED_LOCATION "${c-ares_LIBRARY}")
36 endif()
37
38- # to be compatible with old Seastar
39- add_library(c-ares::c-ares ALIAS c-ares::cares)
40-
41 if(NOT TARGET c-ares::c-ares)
42 add_library(c-ares::c-ares ALIAS c-ares::cares)
43 endif()
44
45From 469d82a1f387f342797636fdfff84f570b22f928 Mon Sep 17 00:00:00 2001
46From: Kefu Chai <[email protected]>
47Date: Sun, 8 Jun 2025 16:24:51 +0800
48Subject: [PATCH 2/2] cmake: bump minimum required CMake version to 3.22.1
49
50Bump the minimum required CMake version from 3.5 to 3.22.1 in both
51Ceph and embedded dmclock to address deprecation warnings.
52
53CMake 4.0.2 generates deprecation warnings for projects requiring
54versions below 3.10:
55
56```
57CMake Deprecation Warning at src/dmclock/CMakeLists.txt:1 (cmake_minimum_required):
58 Compatibility with CMake < 3.10 will be removed from a future version of
59 CMake.
60
61 Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
62 to tell CMake that the project requires at least <min> but has been updated
63 to work with policies introduced by <max> or earlier.
64```
65
66The upstream CI workflow uses Ubuntu 22.04 (CMake 3.22.1) and CentOS 9
67(CMake 3.26.5), so bumping to 3.22.1 maintains compatibility with our
68supported build environments while enabling access to newer CMake
69features.
70
71Signed-off-by: Kefu Chai <[email protected]>
72---
73 CMakeLists.txt | 2 +-
74 src/dmclock/CMakeLists.txt | 2 +-
75 2 files changed, 2 insertions(+), 2 deletions(-)
76
77diff --git a/CMakeLists.txt b/CMakeLists.txt
78index fb1a9f07212e9..fde3fed781a37 100644
79--- a/CMakeLists.txt
80+++ b/CMakeLists.txt
81@@ -1,4 +1,4 @@
82-cmake_minimum_required(VERSION 3.16)
83+cmake_minimum_required(VERSION 3.22.1)
84
85 project(ceph
86 VERSION 20.0.0
87diff --git a/src/dmclock/CMakeLists.txt b/src/dmclock/CMakeLists.txt
88index 049ea5e312945..52742e846f8af 100644
89--- a/src/dmclock/CMakeLists.txt
90+++ b/src/dmclock/CMakeLists.txt
91@@ -1,4 +1,4 @@
92-cmake_minimum_required(VERSION 3.5.1)
93+cmake_minimum_required(VERSION 3.22.1)
94
95 project(dmclock CXX)
96