Update cmake to fix warnings#101
Merged
Merged
Conversation
Resolves warning: ``` CMake Deprecation Warning at common/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. ```
Helps to avoid lots of warnings below: ``` CMake Warning (dev) at CMakeLists.txt:80 (install): Policy CMP0177 is not set: install() DESTINATION paths are normalized. Run "cmake --help-policy CMP0177" for policy details. Use the cmake_policy command to set the policy and suppress this warning. ```
Croydon
approved these changes
Nov 18, 2025
Contributor
Croydon
left a comment
There was a problem hiding this comment.
Thanks for splitting these minimal changes off the other PR to keep the project working with CMake 4.0+
LGTM
Contributor
Author
|
@GitMensch ping |
This was referenced Nov 26, 2025
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.
cmake_minimum_requiredto 3.10.< 3.5 breaks on 4.0, <3.10 is considered deprecated since 3.31. So 3.10 is used as the minimum version
Ref: https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
CMP0177toOLDexplicitly - this policy was introduced in 3.31 and it's normalizing destinations paths ininstall. Since we're using min cmake 3.10, it's usingOLDimplicitly and issues a warning.Using
NEWis not big of a deal - probably will work without issues, but just don't want to introduce 2 different behaviours in 1 cmake file. So I've just set it toOLDexpliictly to avoid warnings and added a comment, so we can just remove it when time comes.Ref: https://cmake.org/cmake/help/latest/policy/CMP0177.html
This PR has intersecting changes with #99, but #99 currently seems stale and I wanted to submit those simple fixes separately. Bumping cmake min version is the most important, since it breaks configuration completely on cmake 4.0 without patching cmake file.
@Croydon can you please take a look?