Skip to content

Conversation

@Flamefire
Copy link
Contributor

As previously discussed this adds CI jobs that configure the Boost tree with various CMake versions.

For that the CMake source is downloaded and compiled, then cached for future jobs.
Using existing binary downloads failed due to e.g. updated OpenSSL libraries installed on the system. For a similar reason libcurl-dev is installed to be used by CMake instead of it building its bundled version of cURL which is incompatible with the system OpenSSL in some CMake versions.

Individual Boost libraries require different minimal CMake versions. That should be declared in their CMakeLists correctly. The cmake_minimum_required line is used to determine which libraries to exclude for the currently tested CMake version.
Some depend on libraries requiring a higher CMake version than itself or fail to declare their required CMake version, hence a manual list is maintained in addition to that.

The list of tested CMake versions is based on features selected depending on the CMake version:

  • 3.8 as the minimal required one, see Update required CMake version to 3.8 boost#1088
  • 3.9 as the one where BoostTestJamfile works
  • 3.10 checked for by BoostInstall.cmake
  • 3.13 As the first to support automatic installation via BoostInstall
  • 3.31 as the last 3.x version
  • 4.0 as the first 4.x version
  • 4.1 as the current version
  • Some versions inbetween based on usage by Boost libraries and known prior failures (e.g. 3.11 allows whitelisted properties on INTERFACE libraries, others fail as seen with 3.16 on Windows, 3.19 lifted the restriction)

Add a configure-only test with different CMake versions.
Use especially those that are tested for in CMake files.
- Testing requires CMake 3.9, exclude earlier and add 3.9 job
- Exclude individual libraries according to their required CMake versions
- Drop testing for CMake < 3.8
- Add versions used by Boost libraries as per:
`grep -rE --only-matching --no-filename --include '*.txt' 'cmake_min[^0-9]*..[0-9]+' */CMakeLi* | sed 's/ //g' | sort -h | uniq -c | sort -h`
@pdimov
Copy link
Member

pdimov commented Oct 1, 2025

          # Libraries that don't declare their correct minimal required CMake version or where dependencies require higher version
          version_greater_equal ${{matrix.cmake_version}} 3.10.0 || excluded+=("gil")
          version_greater_equal ${{matrix.cmake_version}} 3.12.0 || excluded+=("msm")
          version_greater_equal ${{matrix.cmake_version}} 3.14.0 || excluded+=("pfr" "mysql")  # mysql depends on pfr

Should we do something about these?

@Flamefire
Copy link
Contributor Author

Flamefire commented Oct 1, 2025

@pdimov pdimov merged commit 9a834e1 into boostorg:develop Oct 1, 2025
107 checks passed
@Flamefire Flamefire deleted the test-cmake-versions branch October 2, 2025 06:47
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