Skip to content

CMake version requirement 3.1 is getting outdated. #50

@christianbrugger

Description

@christianbrugger

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions