Skip to content

Conversation

nigels-com
Copy link

The current version of make is 4.1.1

It's complaining that cmake 3.9 policy is deprecated since 3.31

This change brings the minimum cmake requirement to 3.10 (Nov 2017).

Boost more broadly needs cmake 3.20 (Apr 2021) or newer to build monolithically.

@Flamefire
Copy link
Collaborator

Boost more broadly needs cmake 3.20 (Apr 2021) or newer to build monolithically.

Why is that? What is the limiting factor for earlier versions?

3.10 Seems reasonable as that is what is available in Ubuntu 18 repos

Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.73%. Comparing base (7ba7e46) to head (dd4f7da).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #199      +/-   ##
===========================================
- Coverage    99.10%   97.73%   -1.37%     
===========================================
  Files           34       34              
  Lines         3591     3052     -539     
===========================================
- Hits          3559     2983     -576     
- Misses          32       69      +37     

see 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nigels-com
Copy link
Author

Why is that? What is the limiting factor for earlier versions?

Good question. I dug some more.

Cobalt (cmake-3.10.0 fails, cmake-3.12.0 succeeds)

$ git clean -xdf . && PATH=/opt/cmake-3.10.0-Linux-x86_64/bin:$PATH cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=N -DCMAKE_CXX_COMPILER=clang++-19 -DBOOST_INCLUDE_LIBRARIES=cobalt && ninja
...
-- Boost installation support requires CMake 3.13 (have 3.10.0)
CMake Error at libs/cobalt/CMakeLists.txt:7 (cmake_minimum_required):
  CMake 3.12...3.20 or higher is required.  You are running version 3.10.0

Heap (cmake-3.18.0 fails, cmake-3.19.0 succeeds)

$ git clean -xdf . && PATH=/opt/cmake-3.12.0-Linux-x86_64/bin:$PATH cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=N -DCMAKE_CXX_COMPILER=clang++-19 -DBOOST_INCLUDE_LIBRARIES=heap && ninja
...
-- Boost installation support requires CMake 3.13 (have 3.12.0)
CMake Error at libs/heap/CMakeLists.txt:22 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "CMAKE_CXX_STANDARD_REQUIRED" is not allowed.

Boost more broadly needs cmake 3.20 (Apr 2021) or newer to build monolithically.

cmake 3.19.0 (Nov 2020) does also work monolithically.

Are you aware of some particular cmake baseline version that is supposed to be supported?
Looks like some build coverage could be added, or the alphas could be scrutinized manually.
I'm generally happy to use a recent cmake, but that is an extra hurdle for newcomers though.

@Flamefire
Copy link
Collaborator

Cobalt (cmake-3.10.0 fails, cmake-3.12.0 succeeds)

CMake Error at libs/cobalt/CMakeLists.txt:7 (cmake_minimum_required):
  CMake 3.12...3.20 or higher is required.  You are running version 3.10.0

Heap (cmake-3.18.0 fails, cmake-3.19.0 succeeds)

$ git clean -xdf . && PATH=/opt/cmake-3.12.0-Linux-x86_64/bin:$PATH cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=N -DCMAKE_CXX_COMPILER=clang++-19 -DBOOST_INCLUDE_LIBRARIES=heap && ninja
...
-- Boost installation support requires CMake 3.13 (have 3.12.0)
CMake Error at libs/heap/CMakeLists.txt:22 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "CMAKE_CXX_STANDARD_REQUIRED" is not allowed.

Ok so Cobalt does require 3.12, Heap does have a bug in its CMakeLists which likely will be fixed in the next version.

cmake 3.19.0 (Nov 2020) does also work monolithically.

That is only due to CMake 3.19 ignoring the bug mentioned above.

Are you aware of some particular cmake baseline version that is supposed to be supported?

I'm not aware of that as there is no Boost-wide rule to support a specific minimum version.
As installation support requires 3.13 using that is a safe bet, once the bug fixes are merged.

Looks like some build coverage could be added, or the alphas could be scrutinized manually. I'm generally happy to use a recent cmake, but that is an extra hurdle for newcomers though.

To still allow 3.9 in general for Nowide I made a different PR that also fixes you issue.

Note that CMake build support is still experimental so some issues might still need to be fixed

@nigels-com
Copy link
Author

To clarify.

This PR #199 emits no warning for cmake-3.31.0.

The alternative PR #200 emits the warning:

$ PATH=/opt/cmake-3.31.0-linux-x86_64/bin:$PATH cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=Y -DCMAKE_CXX_COMPILER=clang++-19 -DBOOST_INCLUDE_LIBRARIES=nowide && ninja
...
CMake Deprecation Warning at libs/nowide/CMakeLists.txt:16 (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 a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

My goal here is to resolve the cmake deprecation warning.

@Flamefire
Copy link
Collaborator

The alternative PR #200 emits the warning:

Thanks for testing!
Turns out the version range specifier should have been "..." not "..". With the fixed commit this works now and I merged that change. Can you double check the current develop branch on your side?

@nigels-com
Copy link
Author

Confirming that. Thanks for the fix.

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