linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernelshark: Allow building with CMake 4+
@ 2025-10-10 13:17 Michal Sojka
  2025-10-13 15:55 ` Yordan Karadzhov
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Sojka @ 2025-10-10 13:17 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Michal Sojka

CMake 4.0 removed compatibility with versions of CMake older than 3.5
[1]. In order to builde Kernelshark with CMake 4, at least version 3.5
needs to be declared. However, versions older than 3.10 are deprecated
so it's probably better to upgrade directly to 3.10.

To support builds with older CMake, as before, we use the "..." syntax
in cmake_minimum_required [3].

[1]: https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features
[2]: https://cmake.org/cmake/help/latest/release/3.31.html#deprecated-and-removed-features
[3]: https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#command:cmake_minimum_required

Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6aa1a5b..54ff97c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
 # Check if cmake has the required version
-cmake_minimum_required(VERSION 3.1.2 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1.2...3.10)
 
 # Set the name and version of the project
 project(kernel-shark)
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kernelshark: Allow building with CMake 4+
  2025-10-10 13:17 [PATCH] kernelshark: Allow building with CMake 4+ Michal Sojka
@ 2025-10-13 15:55 ` Yordan Karadzhov
  0 siblings, 0 replies; 2+ messages in thread
From: Yordan Karadzhov @ 2025-10-13 15:55 UTC (permalink / raw)
  To: Michal Sojka, linux-trace-devel

The patch is applied. Thanks!

Yordan

On 10/10/25 16:17, Michal Sojka wrote:
> CMake 4.0 removed compatibility with versions of CMake older than 3.5
> [1]. In order to builde Kernelshark with CMake 4, at least version 3.5
> needs to be declared. However, versions older than 3.10 are deprecated
> so it's probably better to upgrade directly to 3.10.
> 
> To support builds with older CMake, as before, we use the "..." syntax
> in cmake_minimum_required [3].
> 
> [1]: https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features
> [2]: https://cmake.org/cmake/help/latest/release/3.31.html#deprecated-and-removed-features
> [3]: https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#command:cmake_minimum_required
> 
> Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>
> ---
>   CMakeLists.txt | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 6aa1a5b..54ff97c 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -1,5 +1,5 @@
>   # Check if cmake has the required version
> -cmake_minimum_required(VERSION 3.1.2 FATAL_ERROR)
> +cmake_minimum_required(VERSION 3.1.2...3.10)
>   
>   # Set the name and version of the project
>   project(kernel-shark)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-13 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10 13:17 [PATCH] kernelshark: Allow building with CMake 4+ Michal Sojka
2025-10-13 15:55 ` Yordan Karadzhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).