[newchem-cpp] Assorted CMake Improvements#505
Open
mabruzzo wants to merge 8 commits intograckle-project:newchem-cppfrom
Open
[newchem-cpp] Assorted CMake Improvements#505mabruzzo wants to merge 8 commits intograckle-project:newchem-cppfrom
mabruzzo wants to merge 8 commits intograckle-project:newchem-cppfrom
Conversation
Collaborator
Author
|
I think we need to bump the gold standard cache. I didn't make any changes in this PR that would directly lead to this. All I did was bump the docker image. This makes some sense given experience on my own machine (switching between Python versions often requires me to reset the gold-standard) EDIT: I did in fact bump the gold standard cache and things worked out! |
In the process, I had to bump the minimum required Grackle version (This was a pain to debug)
This was done in anticipation of adding some better handling for dependencies retrieved via FetchContent
2bacdfe to
175de0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes 3 related adjustments to the CMake build-system.
These changes were all made in anticipation to an in-progress pull-request that adds basic benchmarks. The benchmarking executable requires google-benchmark as optional dependency. Just like with the googletest dependency, the when we configure a building requiring google-benchmark, the build-system will automatically search for a preinstalled version of google-benchmark, and if it can't be found the source code will automatically be downloaded and compiled as part of the build.
This PR addresses some stuff that came up in the course of that work.
This PR essentially makes 3 changes:
aptfor the oldest LTS Ubuntu release that still receives general updatespip.clang-tidysupport (recall that it's a C++ linter), I made an oversightclang-tidygets set up, it turns out that we will run it on all dependencies that get built as an embedded part of the Grackle build (this also applies to any other linters that we use in the future)clang-tidydoesn't complain about the source code ofgoogletest. This is actually a bit of anomaly -- presumably because of the widespread popularity ofgoogletest.FetchContent_DeclareandFetchContent_MakeAvailablefind_packagecommand to let builds search for preinstalled dependencies andFetchContentto download source-code for a dependency and build the dependency as an embedded part of the GrackleBuild.FetchContentmakes Grackle Builds easier for people less-experienced with CMake, the recommended best-practice is to make it possible for project consumers to actually provide a precompiled version of a dependency, if they want.find_packageandFetchContent. A large part of this involves passing theFIND_PACKAGE_ARGSkeyword argument toFetchContent_DeclareFIND_PACKAGE_ARGSkeyword argument toFetchContent_DeclareFIND_PACKAGE_ARGSkeyword.FetchContent_DeclareandFetchContent_MakeAvailableFetchContent_MakeAvailable). Instead, we now use well-established logic.FIND_PACKAGE_ARGSto theFetchContent_Declarewhen they use CMake versions >= 3.24.