CLIUtils / CLI11

CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
https://cliutils.github.io/CLI11/book/
Other
3.38k stars 353 forks source link

cmake version deprecation warning #1082

Open oschonrock opened 1 week ago

oschonrock commented 1 week ago

I am using cmake 3.30

and just started getting this:

CMake Deprecation Warning at ext/CLI11/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 a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
phlptp commented 5 days ago

what platform are you running on, I do not get that warning with CMake 3.30.

henryiii commented 5 days ago

That warning was added in CMake 3.31.

henryiii commented 5 days ago

I'd be okay to make this require 3.10+ and drop the old workaround for an old MSVC built-in CMake.

oschonrock commented 5 days ago

That warning was added in CMake 3.31.

yes apologies.. 3.31

It's the version you now get on ubuntu 24.04, when you do

sudo snap install cmake

(the snap version being newer than what you get from the apt repos)

I run it, because latest cmake is usually worth having.

oschonrock commented 5 days ago

I'd be okay to make this require 3.10+ and drop the old workaround for an old MSVC built-in CMake.

That would be great, I currently have it locally modified like so:

$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b35b268..8eff25a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.10)
 # Note: this is a header only library. If you have an older CMake than 3.5,
 # just add the CLI11/include directory and that's all you need to do.

And that "works for me"..

of course can comment better on the wider impact.

oschonrock commented 5 days ago

what platform are you running on, I do not get that warning with CMake 3.30.

apologies cmake 3.31 .

I am running ubuntu 24.04 with

sudo snap install cmake (to get the latest cmake)

phlptp commented 5 days ago

Ok, I will probably be testing 3.31 on some of my applications the week of the 18th. Unless someone makes the changes before then I will update the minimum cmake version at that time.