Skip to content

cmake: require CMake 3.13; build the tests without a PCH below 3.16 - #145

Merged
jll63 merged 1 commit into
boostorg:developfrom
jll63:fix/cmake-3.13
Nov 12, 2026
Merged

jll63 merged 1 commit into
boostorg:developfrom
jll63:fix/cmake-3.13

Conversation

@jll63

@jll63 jll63 commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

(Written by Claude Code, on behalf of @jll63.)

Follow-up to #144, which raised the declared minimum to 3.16 because the tests call target_precompile_headers. That command is the only thing that needs 3.16, and it is only an optimisation, so this PR goes back down to 3.13:

  • cmake_minimum_required(VERSION 3.13...3.20) in the root CMakeLists.txt and in test/cmake_test/CMakeLists.txt.
  • The shared precompiled header in test/CMakeLists.txt is used only when CMAKE_VERSION is at least 3.16. Older CMake builds the tests without it: slower, not different.

3.13 is also the lower bound Boost.CI now uses (boostorg/boost-ci 7d792d689, "Use CMake 3.13 as lower bound"): below it, CMake does not install the package config files.

Testing

CMake 3.13.0 (the Linux binary from cmake.org), standalone build against a Boost super-project checkout, GCC, Debug: configure, build of the tests target, and ctest: 215/215 tests pass, with no precompiled headers.

A configure of the same tree with a bare cmake_minimum_required(VERSION 3.13) under CMake 3.28 and -Wdev printed no policy warnings, so no policy introduced after 3.13 changes anything on that path. That was only exercised on Linux/GCC; the MSVC-specific paths were not.

Not tested: the Boost.CI Min. CMake job on this branch (it will now build CMake 3.13), and Windows.

🤖 Generated with Claude Code

The library itself needs nothing newer than 3.13 (the version Boost.CI now
uses as its floor). Only the tests wanted 3.16, for
target_precompile_headers, so guard that and let older CMake build them
without the shared PCH - slower, not different.

Configured, built and ran the tests (215/215) with CMake 3.13.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://145.openmethod.prtest3.cppalliance.org/libs/openmethod/doc/html/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-11-10 22:42:22 UTC

@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.57%. Comparing base (b681217) to head (36ae0b7).
⚠️ Report is 26 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #145   +/-   ##
========================================
  Coverage    92.56%   92.57%           
========================================
  Files           29       29           
  Lines         2314     2316    +2     
  Branches       699      699           
========================================
+ Hits          2142     2144    +2     
  Misses         111      111           
  Partials        61       61           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f535533...36ae0b7. Read the comment docs.

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

@jll63
jll63 merged commit 536f92b into boostorg:develop Nov 12, 2026
57 checks passed
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