Skip to content

Conversation

@itzexpoexpo
Copy link

Newer versions of CMake complain about version 3.5 being deprecated:

CMake Deprecation Warning at build/_deps/lyra-src/CMakeLists.txt:23 (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.

This patch just marks newer versions as supported, silencing this warning.

The ...<policy_max> syntax was added in 3.12 with earlier versions ignoring it, support for them should not be affected by this change.

# Only need the basic minimum of project, add_library, and
# target_include_directories commands.
cmake_minimum_required( VERSION 3.5 )
cmake_minimum_required( VERSION 3.5..3.31 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just set the max to 4.999 (or appropriately large number to cover future 4.x versions)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake does not refuse that outright and it does silence the warning, but I'd avoid it.

If some future 4.x version introduces a policy change incompatible with lyra, it'd silently enable that change, potentially raising odd errors for the user.

I only have 3.31 at hand to test right now, but it should be fine for at least a few years

@grafikrobot grafikrobot moved this to 👀 In review in BFG Tasks Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

2 participants