Upgrade CI to checkout@v6 and fix CMakeLists.txt for CMake 4#2
Merged
Conversation
Increase minimum required CMake version from 3.1 to 3.5. Fixes error "Compatibility with CMake < 3.5 has been removed from CMake" when using CMake >= 4.
Use project() command instead of setting PROJECT_NAME and PROJECT_TYPE manually. Fixes warning "The top-level CMakeLists.txt file must contain a literal, direct call to the project() command."
Owner
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains a few commits that are not directly related to one another except that they serve to make this project build successfully in CI again. I've described each change with its own commit message so I recommend not squashing the commits when merging. If you would prefer an individual PR for each commit let me know.
The workflows are updated to use the latest version of actions/checkout because the older version that was being used is deprecated.
The workflows failed with this message:
To fix this, the minimum CMake version is increased from 3.1 to 3.5. If you are using any CMake features whose behaviors have changed between CMake 3.1 and 3.5, other parts of the CMakeLists.txt may need corresponding adjustment. I have not attempted to determine if this is needed.
In fact, CMake is already issuing this warning:
We could increase the minimum to 3.10 to remove this warning, but again if you are using any CMake features that changed by 3.10, other changes may be needed.
This warning appeared:
To fix this, I added the
project()line, replacing manually settingPROJECT_NAMEandPROJECT_TYPEwithset().Merging this PR is a prerequisite for making corresponding changes in mpw.
I have more changes to suggest in another PR after this one is merged.