Skip to content

Support CMake 3.16 - #4

Merged
han-xudong merged 6 commits into
mainfrom
feat/cmake-3.16
Jul 22, 2026
Merged

han-xudong merged 6 commits into
mainfrom
feat/cmake-3.16

Conversation

@han-xudong

@han-xudong han-xudong commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • lower the supported CMake baseline from 3.20 to 3.16
  • select either GTest::gtest_main or GTest::Main based on the available CMake/GoogleTest integration
  • add a Pixi environment pinned to CMake 3.16.5 and a dedicated CI compatibility job
  • prepare the behavior-compatible 0.1.2 patch release

Verification

  • pixi run test — 10/10 tests passed
  • pixi run shared-test
  • pixi run static-test
  • pixi run -e cmake-316 cmake-316-test — shared and static consumers passed with CMake 3.16.5
  • pixi run format-check
  • pixi run tidy
  • bash test/release_publish_test.sh
  • git diff --check

Compatibility

No public API, CLI, network behavior, install layout, SOVERSION, or libcurl requirement changes.

Summary by CodeRabbit

  • New Features
    • Lowered the minimum required CMake version to 3.16 and updated the project to v0.1.2.
    • Added CI coverage and an automated check to validate shared and static installation compatibility with the 3.16.x baseline.
  • Bug Fixes
    • Improved test setup to use the appropriate GoogleTest main variant, failing fast when none is available.
  • Documentation
    • Updated the README and changelog with the new CMake requirement and release details.
  • Chores
    • Updated .gitignore to ignore /worktrees/.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c11cde42-21fb-48c7-b3d4-c963c4dc3ce2

📥 Commits

Reviewing files that changed from the base of the PR and between 4c13e64 and 75e99b8.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The project now targets CMake 3.16, selects compatible GoogleTest main targets, and validates shared and static installed consumers in a pinned CMake 3.16 Pixi environment. Version metadata, changelog text, README requirements, CI, and .gitignore are updated.

Changes

CMake 3.16 compatibility

Layer / File(s) Summary
Build and test target compatibility
CMakeLists.txt, test/CMakeLists.txt
The minimum CMake version is lowered to 3.16; test targets use a detected GTest::gtest_main or GTest::Main target and fail configuration when neither exists.
Pinned compatibility validation
pixi.toml, test/cmake_compatibility_test.sh, .github/workflows/ci.yml
A pinned CMake 3.16 Pixi environment verifies the CMake version and runs shared and static installation tests in CI.
Release and project metadata
CHANGELOG.md, README.md, pixi.toml, .gitignore
Project versions are updated to 0.1.2, documentation records CMake 3.16 as the minimum, and /worktrees/ is ignored.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant Pixi
  participant CompatibilityTest
  participant InstallTest
  CI->>Pixi: run cmake-316-test
  Pixi->>CompatibilityTest: execute script with CMake 3.16
  CompatibilityTest->>CompatibilityTest: validate cmake --version
  CompatibilityTest->>InstallTest: run shared installation test
  CompatibilityTest->>InstallTest: run static installation test
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: lowering support to CMake 3.16.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cmake-3.16

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/ci.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/cmake_compatibility_test.sh (1)

15-16: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Exercise the BUILD_TESTING=ON path.

Both calls only run test/install_test.sh, whose package configuration uses BUILD_TESTING=OFF; therefore this job never validates the newly changed GoogleTest target-selection logic under CMake 3.16. Add a configure/build/CTest compatibility step with testing enabled.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/cmake_compatibility_test.sh` around lines 15 - 16, Add a CMake
compatibility configure/build/CTest step to test/cmake_compatibility_test.sh
with BUILD_TESTING=ON, ensuring it exercises the updated GoogleTest
target-selection logic under CMake 3.16 in addition to the existing
install_test.sh calls.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 74: Update the actions/checkout step to disable persisted Git credentials
by setting persist-credentials to false, while leaving the existing checkout
behavior unchanged.

---

Nitpick comments:
In `@test/cmake_compatibility_test.sh`:
- Around line 15-16: Add a CMake compatibility configure/build/CTest step to
test/cmake_compatibility_test.sh with BUILD_TESTING=ON, ensuring it exercises
the updated GoogleTest target-selection logic under CMake 3.16 in addition to
the existing install_test.sh calls.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e931ee3-ee43-4ef9-97b3-7f88565bdcf6

📥 Commits

Reviewing files that changed from the base of the PR and between b111e33 and 4c13e64.

⛔ Files ignored due to path filters (1)
  • pixi.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • .gitignore
  • CHANGELOG.md
  • CMakeLists.txt
  • README.md
  • pixi.toml
  • test/CMakeLists.txt
  • test/cmake_compatibility_test.sh

Comment thread .github/workflows/ci.yml
@han-xudong
han-xudong merged commit bb7df8d into main Jul 22, 2026
16 checks passed
@han-xudong
han-xudong deleted the feat/cmake-3.16 branch July 22, 2026 14:24
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.

1 participant