Min. CMake job: CMAKE_POLICY_VERSION_MINIMUM is not passed for CMake 3.16 (follow-up to #358)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cmake, shell
- Domain
- build-system, ci-cd
Research direction
Find the script that assembles flags for the “Min. CMake” job and read the version threshold condition described in the issue. Check how the condition handles version 3.16.0, then update the flag behavior according to the suggested fix and verify the job can configure the CMake 3.16.0 tarball with CMake 4.4.4.
Written by the indexing model from the issue text.
Description
(Written by Claude Code, on behalf of @jll63.)
Follow-up to #358. The fix in 8f5e11bc0 does not take effect for CMake 3.16, so the Min. CMake job still fails with the same error, now on boost-ci 7163e84 (and 0a0a444):
https://github.com/boostorg/openmethod/actions/runs/42386369323/job/128444549964?pr=144
CMake Error at Source/kwsys/CMakeLists.txt:89 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.5 has been removed from CMake.
The flag is only added for versions older than 3.14:
min=3.14
if [[ "$version" != "$(printf '%s\n' "$min" "$version" | sort -V | tail -n1)" ]]; then
flags+=("-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
fi
3.16.0 is newer than 3.14, so for version=3.16.0 the condition is false and CMAKE_POLICY_VERSION_MINIMUM is not passed. The problem is the threshold: the comment assumes that sources newer than 3.14 no longer have minimums below 3.5, and that is not the case. The top-level CMakeLists.txt of 3.16.0 uses cmake_minimum_required(VERSION 3.1...3.15), which CMake 4 accepts, but Source/kwsys/CMakeLists.txt:89 is still CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR).
Checked locally, configuring the cmake-3.16.0 tarball with CMake 4.4.4:
- without
-DCMAKE_POLICY_VERSION_MINIMUM=3.5: fails atSource/kwsys/CMakeLists.txt:89, as in CI; - with it: configuring gets past
kwsys.
Suggested fix: pass the flag unconditionally (CMake < 3.x ignores an unused -D cache entry), or raise min to a version that is verified to be free of pre-3.5 minimums.
- Dominant language
- Shell
- Stars
- 18
- Forks
- 24
- Avg merge
- 16h 49m
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/boost-ci
-
Upgrade s390x job to clang 13May be free again @jeking3 claimed this 122 days ago, and no pull request is open. Open
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Can we use GHA caching of the checked-out code and dependencies to reduce build burden?Possibly taken @Flamefire claimed this 711 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
All issues in boostorg/boost-ci
Similar issues
-
enhancement security severity:low
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Battle-Cattle/BCUK-Bot-4#959 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Frogging-Family/linux-tkg#1265 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
community-scripts/core#217 ·
Maintainers usually reply within 1 day
-
known-red S3: friction & debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MedakaLang/medaka#4969 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day