Uh oh!
There was an error while loading. Please reload this page.
Replace git submodules with find_package + FetchContent - #4085
Open
paulromano wants to merge 3 commits into
Open
Replace git submodules with find_package + FetchContent#4085paulromano wants to merge 3 commits into
find_package + FetchContent#4085paulromano wants to merge 3 commits into
Conversation
Pin fmt, pugixml, and Catch2 to release tags rather than bare commit SHAs. The fmt and pugixml pins resolve to the same source the submodules pointed at (11.0.2 and v1.15). The Catch2 submodule pointed at an untagged commit from May 2023 (v3.3.2-46-g5a40b227), so there was no lossless tag to move to and it is pinned to v3.16.0 instead. Warn about the removed OPENMC_FORCE_VENDORED_LIBS and GIT_SUBMODULE options rather than silently ignoring them. In the new CI job, check out full history and tags so that git describe based versioning works instead of falling back to 0.0.0, build the C++ unit tests so that the Catch2 code path is covered, run ctest, and add a matrix leg that resolves fmt and pugixml as installed packages. Document FETCHCONTENT_FULLY_DISCONNECTED and FETCHCONTENT_BASE_DIR for packaging, and drop the legacy target alias after FetchContent_MakeAvailable, which is unreachable because pugixml defines that alias itself. Revert the release notes for 0.16.0, which has already been released. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 freeto 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.
Description
This PR replaces the use of git submodules (fmt, pugixml, Catch2) with a
find_package+FetchContentapproach. For each of the dependencies,find_packageis called first and if it finds a suitable package will use it directly. If none is found, it falls back to CMake FetchContent archives pinned to release tags. This allows ordinary source clones and archives to configure without git-managed dependencies. I've also updated Catch2 to the latest v3.16.0 release because the previous submodule revision was untagged.In order to keep the dependency workflow compatible with our stated policy, I've raised the declared CMake minimum version to CMake 3.22 and implemented an explicit workflow that calls
find_packagefollowed byFetchContentif needed. CMake version 3.24 introduces better integration so once our minimum is >= 3.24, we can simplify the setup.Checklist
I have followed the style guidelines for Python source files (if applicable)I have added tests that prove my fix is effective or that my feature works (if applicable)