public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Matthias Schwarzott <zzam@gentoo.org>
Cc: Alan Maguire <alan.maguire@oracle.com>, dwarves@vger.kernel.org
Subject: Re: pahole: Fix deprecated cmake_minimum_required
Date: Tue, 28 Oct 2025 11:53:35 -0300	[thread overview]
Message-ID: <aQDY7_VtHlFP7ssB@x1> (raw)
In-Reply-To: <bef26065-2dd0-43df-9dfb-f3c4b7a17685@gentoo.org>

On Tue, Oct 28, 2025 at 07:58:17AM +0100, Matthias Schwarzott wrote:
> I got to know that using a cmake_minimum_required version of less than 3.10
> is deprecated. Support for it will be removed from cmake.

Support for what? For features present before 3.10? So we better make
sure that we have pahole use that 'cmake_minimum_required(3.10)' so that
we don't end up using such deprecated cmake features and end up breaking
the build in distros using, say, cmake 3.11?

Please CC dwarves@vger.kernel.org when sending patches, like I did in
this reply :-)

Thanks!

- Arnaldo
 
> I suggest to raise the minimum required cmake version to at least 3.10
> (released 20 November 2017).
> See attached patch.

> see gentoo pahole issue: https://bugs.gentoo.org/964482
> gentoo overall issue: https://bugs.gentoo.org/964405
 
> cmake merge request:
> https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9875
 
> deprecate-pre-3.10
> ------------------
 
> * Compatibility with versions of CMake older than 3.10 is now deprecated
>   and will be removed from a future version.  Calls to
>   :command:`cmake_minimum_required` or :command:`cmake_policy` that set
>   the policy version to an older value now issue a deprecation diagnostic.

> From b9e521ef5e9c01d8d19f505de778ceaef5ecd4eb Mon Sep 17 00:00:00 2001
> From: Matthias Schwarzott <zzam@gentoo.org>
> Date: Tue, 28 Oct 2025 07:52:00 +0100
> Subject: [PATCH] CMakeLists.txt: Require cmake 3.10 or higher
> 
> To fix this warning from cmake:
> 
> CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
>   Compatibility with CMake < 3.10 will be removed from a future version of
>   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.
> 
> Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
> ---
>  CMakeLists.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index eb873000d7bf..91522c1382a5 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -1,4 +1,4 @@
> -cmake_minimum_required(VERSION 3.5)
> +cmake_minimum_required(VERSION 3.10)
>  project(pahole C)
>  cmake_policy(SET CMP0005 NEW)
>  
> -- 
> 2.51.0
> 


       reply	other threads:[~2025-10-28 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bef26065-2dd0-43df-9dfb-f3c4b7a17685@gentoo.org>
2025-10-28 14:53 ` Arnaldo Carvalho de Melo [this message]
2025-11-05  7:00   ` pahole: Fix deprecated cmake_minimum_required Matthias Schwarzott
2025-11-11  5:26     ` Matthias Schwarzott

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=aQDY7_VtHlFP7ssB@x1 \
    --to=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=dwarves@vger.kernel.org \
    --cc=zzam@gentoo.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