Skip to content

Update cmake to fix warnings#101

Merged
GitMensch merged 2 commits into
lexxmark:masterfrom
Andrej730:update-cmake
Nov 18, 2025
Merged

Update cmake to fix warnings#101
GitMensch merged 2 commits into
lexxmark:masterfrom
Andrej730:update-cmake

Conversation

@Andrej730
Copy link
Copy Markdown
Contributor

  1. Updating cmake_minimum_required to 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

  1. Set CMP0177 to OLD explicitly - this policy was introduced in 3.31 and it's normalizing destinations paths in install. Since we're using min cmake 3.10, it's using OLD implicitly and issues a warning.

Using NEW is 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 to OLD expliictly 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?

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.
```
Copy link
Copy Markdown
Contributor

@Croydon Croydon left a comment

Choose a reason for hiding this comment

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

Thanks for splitting these minimal changes off the other PR to keep the project working with CMake 4.0+

LGTM

@Andrej730
Copy link
Copy Markdown
Contributor Author

@GitMensch ping

@GitMensch GitMensch merged commit bf7a3ad into lexxmark:master Nov 18, 2025
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.

3 participants