linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Sojka <michal.sojka@cvut.cz>
To: linux-trace-devel@vger.kernel.org
Cc: Michal Sojka <michal.sojka@cvut.cz>
Subject: [PATCH] kernelshark: Allow building with CMake 4+
Date: Fri, 10 Oct 2025 15:17:15 +0200	[thread overview]
Message-ID: <20251010131715.1123934-1-michal.sojka@cvut.cz> (raw)

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


             reply	other threads:[~2025-10-10 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-10 13:17 Michal Sojka [this message]
2025-10-13 15:55 ` [PATCH] kernelshark: Allow building with CMake 4+ Yordan Karadzhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251010131715.1123934-1-michal.sojka@cvut.cz \
    --to=michal.sojka@cvut.cz \
    --cc=linux-trace-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).