fix: Force CMake to run with the policy behavior of version 3.5 to avoid c…#3075
Conversation
…ases where a higher version of CMake does not compile
WalkthroughThis pull request removes specific cleanup commands from the CI workflow configuration and adds a CMake policy enforcement argument. In the GitHub workflow file, cleanup steps no longer delete the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CMakeLists.txt (1)
155-157: Consistent Enforcement of CMake Policy Version
Multiple ExternalProject_Add blocks (e.g., for gtest, gflags, glog, snappy, zstd, fmt, lz4, zlib, gperftools, rocksdb, and rediscache) now include the argument:
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
This enforces that each dependency is built using the policy behavior of CMake 3.5, which is central to this PR’s objective.Consider centralizing this flag into a CMake variable (for example,
set(POLICY_3_5_FLAG "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")) to reduce duplication and simplify future maintenance.Also applies to: 196-199, 273-275, 315-317, 357-359, 394-396, 437-439, 475-477, 508-510, 631-632, 674-675
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/pika.yml(2 hunks)CMakeLists.txt(12 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: build_on_centos
- GitHub Check: build_on_macos
- GitHub Check: build_on_ubuntu
- GitHub Check: Analyze (go)
🔇 Additional comments (3)
.github/workflows/pika.yml (2)
108-111: CI Cleanup Modification – Preserve Dependency Artifacts
The removal of any commands deleting the./deps(and in macOS, the./buildtree) directory is clearly intentional. In the CentOS job, only the./buildtreesdirectory is removed (line 110), which should help preserve dependency artifacts between builds.Please verify that retaining these directories does not lead to stale files interfering with subsequent builds.
167-172: macOS Cleanup Adjustment – Selective Deletion
In the macOS job, the cleanup step now retains dependency directories while removing only the./buildtreesdirectory (line 171). This aligns with the objective of keeping dependencies intact for stability.Ensure that any files copied from
deps/lib(lines 169–170) remain consistent with the build requirements over time.CMakeLists.txt (1)
1-7: CMake Version and Policy Notes
The project already requires CMake 3.18 (line 1) yet enforces an older policy behavior for external projects. This deliberate mismatch is acceptable if the older policy improves compatibility with certain dependency builds.Please ensure that enforcing the 3.5 policy does not introduce any unforeseen incompatibilities with project code or newer CMake features used elsewhere.
…ases where a higher version of CMake does not compile (OpenAtomFoundation#3075)
…ases where a higher version of CMake does not compile
Summary by CodeRabbit