Conversation
WalkthroughRaised CMake minimum to 3.12, removed legacy cmake_policy handling, and added a status message printing the detected CMake version. In tests, removed the CMake-version gate that disabled benchmarks, leaving benchmark configuration unguarded by CMake version. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1973 +/- ##
===========================================
- Coverage 83.89% 79.41% -4.49%
===========================================
Files 163 161 -2
Lines 14073 14491 +418
Branches 3165 3469 +304
===========================================
- Hits 11807 11508 -299
- Misses 1241 1952 +711
- Partials 1025 1031 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Through the years, we have not actually bumped the minimum CMake version we support, and that has sometimes meant having to implement things in a more difficult way or turning down contributions altogether since it would not be possible to support. (Publicly we have bumped the minimum, but in fact we haven't bumped the actual version checks, see below).
Backwards compatibility with CMake version 3.5 is also no longer supported by newer CMake releases, and 3.10 has been deprecated. This does not impact us negatively currently, but it might at some point.
For the upcoming 2.3.x release series, I'd like to bump the minimum CMake version we support, and I'd like to suggest 3.12.
I chose to suggest 3.12 based on what features we already depend on for Google Benchmark and what I could find that various Linux distros are shipping, it seems like a good middle ground between keeping up with new features and keeping backwards compatibility. We could also choose 3.14, but I haven't found any new feature that would require that, in fact I didn't see anything interesting until 3.18, and even that was not really that interesting.
We currently specify 3.14 as the minimum CMake version we pledge to support for 2.1.x/2.2.x on the Wiki. I guess we could edit that to say 3.12 now that those releases won't have any new features that would require updating the version. Should we say 3.12 for 2.3.x as well if we land on that for the actual CMake requirement?
Ref: https://github.com/zlib-ng/zlib-ng/wiki
For reference:
3.5 released 2016
3.12 released 2018
3.14 release 2019
In addition to a plethora of general improvements, such as improved understanding of compilers, platforms, libraries, etc, these CMake features improvements stood out to me while reading through the release notes as things we might want to utilize:
3.6:
3.7:
3.9:
https://cmake.org/cmake/help/latest/module/GoogleTest.html
3.10:
https://cmake.org/cmake/help/latest/module/GoogleTest.html#command:gtest_discover_tests
3.12:
Summary by CodeRabbit