* Re: pahole: Fix deprecated cmake_minimum_required [not found] <bef26065-2dd0-43df-9dfb-f3c4b7a17685@gentoo.org> @ 2025-10-28 14:53 ` Arnaldo Carvalho de Melo 2025-11-05 7:00 ` Matthias Schwarzott 0 siblings, 1 reply; 3+ messages in thread From: Arnaldo Carvalho de Melo @ 2025-10-28 14:53 UTC (permalink / raw) To: Matthias Schwarzott; +Cc: Alan Maguire, dwarves 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 > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pahole: Fix deprecated cmake_minimum_required 2025-10-28 14:53 ` pahole: Fix deprecated cmake_minimum_required Arnaldo Carvalho de Melo @ 2025-11-05 7:00 ` Matthias Schwarzott 2025-11-11 5:26 ` Matthias Schwarzott 0 siblings, 1 reply; 3+ messages in thread From: Matthias Schwarzott @ 2025-11-05 7:00 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Alan Maguire, dwarves Am 28.10.25 um 15:53 schrieb Arnaldo Carvalho de Melo: > 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? Similar. If we declare cmake_minimum_version less than 3.10 then a new released cmake-4.3 might error out similar to this (when I reduce min-version to 3.0): CMake Error at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from 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. Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. > > Please CC dwarves@vger.kernel.org when sending patches, like I did in > this reply :-) Good to know. Regards Matthias > > 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 >> > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pahole: Fix deprecated cmake_minimum_required 2025-11-05 7:00 ` Matthias Schwarzott @ 2025-11-11 5:26 ` Matthias Schwarzott 0 siblings, 0 replies; 3+ messages in thread From: Matthias Schwarzott @ 2025-11-11 5:26 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Alan Maguire, dwarves Am 05.11.25 um 08:00 schrieb Matthias Schwarzott: > Am 28.10.25 um 15:53 schrieb Arnaldo Carvalho de Melo: >> 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? > > Similar. If we declare cmake_minimum_version less than 3.10 then a new > released cmake-4.3 might error out similar to this (when I reduce min- > version to 3.0): > > CMake Error at CMakeLists.txt:1 (cmake_minimum_required): > Compatibility with CMake < 3.5 has been removed from 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. > > Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. > Is there a reason to not add it to the repository? Sadly it is not part of v1.31. If you want the change to be even less harmful could also be changed to: cmake_minimum_required(VERSION 3.5...3.10) The point is: Distributions will most likely have to patch pahole with the next cmake release that really changes the minimal version for cmake_minimum_required. Regards Matthias >> >> Please CC dwarves@vger.kernel.org when sending patches, like I did in >> this reply :-) > > Good to know. > > Regards > Matthias > >> >> 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 >>> >> > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-11 5:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <bef26065-2dd0-43df-9dfb-f3c4b7a17685@gentoo.org>
2025-10-28 14:53 ` pahole: Fix deprecated cmake_minimum_required Arnaldo Carvalho de Melo
2025-11-05 7:00 ` Matthias Schwarzott
2025-11-11 5:26 ` Matthias Schwarzott
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox