Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CMake version requirement 3.1 is getting outdated. #50

Open
christianbrugger opened this issue Oct 20, 2024 · 0 comments
Open

CMake version requirement 3.1 is getting outdated. #50

christianbrugger opened this issue Oct 20, 2024 · 0 comments

Comments

@christianbrugger
Copy link

On CMake 3.27 I get the following warning:

CMake Deprecation Warning at external/gcem/CMakeLists.txt:21 (cmake_minimum_required):
  Compatibility with CMake < 3.5 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.


-- GCE-Math version 1.18.0

On CMake 3.31 I get the following warning:

CMake Deprecation Warning at external/gcem/CMakeLists.txt:21 (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.


-- GCE-Math version 1.18.0

The current line is:

cmake_minimum_required(VERSION 3.1)

I think its time to update it or add a max suffix, as suggested by the warning.

Looking at the CMakeLists file and how simple it is, I don't think anything should be affected by the new policies. Also I did a test with both 3.25 and 3.31 and both compiles without any new warnings.

Potential Solution

I either suggest going up to 3.10:

cmake_minimum_required(VERSION 3.10)

or to 3.12 with max 3.31, as 3.12 is the one where <max_policy> was introduced.

cmake_minimum_required(VERSION 3.12...3.31)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant