-
Notifications
You must be signed in to change notification settings - Fork 35
♻️ Refactor CMake structure and replace submodules with FetchContent
#515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
9668f9d
to
cf9eece
Compare
4 tasks
burgholzer
added a commit
to munich-quantum-toolkit/qcec
that referenced
this pull request
Jan 5, 2024
## Description This PR was triggered by the failures in #349 and its purpose is to better isolate the changes into separate PRs. - munich-quantum-toolkit/core#515 has dropped the submodules in `mqt-core` and replaced them with `FetchContent`. As such, the `googletest` test dependency is no longer available at its typical location. Consequently, this PR now also uses `FetchContent` to get `googletest`. In a future PR, this will most likely be extended to the `mqt-core` submodule as well. This should unblock #349. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Signed-off-by: burgholzer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
minor
Minor version update
refactor
Anything related to code refactoring
submodules
Pull requests that update Submodules code
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 was triggered by
FetchContent
instead of git module directly qcec#302it replaces the use of git submodules (which always created problems and made things complicated) with
FetchContent
directives.These directives are configured in a way that they first look for a system-installed version of the dependency (via the
find_package(...)
mechanism) and only fetch the dependency to build it from source when no installed version was found.There are multiple ways to configure the overall process. Refer to the official CMake documentation: https://cmake.org/cmake/help/latest/module/FetchContent.html
This allows us to simplify quite some processes and also reduces the frequency of updates.
Furthermore, one can take advantage of system installed dependencies and can avoid the need to build these from scratch.
Once we raise our minimum required CMake version, the respective code can be simplified quite a bit.
Checklist: