Skip to content

Introduce max policy version for compatibility with newer CMake versions #36

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

StephenCWills
Copy link
Contributor

GitHub Actions is updating to CMake 4.0.0 on all their Ubuntu runner images. This version has removed support for versions before CMake 3.5. Any chance we could get the minimum required version raised to resolve the following error?

CMake Error at build/_deps/lua-src/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.

@walterschell
Copy link
Owner

Thanks for the fix. In order to preserve backward compatibility would you mind changing the fix to use cmake_minimum_required(VERSION 3.1...3.12) That way it doesn’t needlessly break ancient versions of CMake.

@StephenCWills StephenCWills changed the title Raise minimum required CMake version to 3.5 Introduce max policy version for compatibility with newer CMake versions Apr 4, 2025
@StephenCWills
Copy link
Contributor Author

FYI, I was trying to test this, but I couldn't get a newer runner image to execute my CI job. I looked into it, and it appears that GitHub downgraded their CI runners to avoid the breakage they introduced. They're also working to pin the CMake version so they can upgrade without this error happening.

Regardless, I went ahead and made the change you asked for. Perhaps it will come in handy for users running CMake 4.0.

@walterschell walterschell merged commit 3ed55a5 into walterschell:master Apr 4, 2025
8 checks passed
@walterschell
Copy link
Owner

Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants