-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ replace MQT Core Submodule with FetchContent (#275)
This PR replaces the mqt-core submodule with a FetchContent directive, which should hopefully improve the stability of the library. It also updates mqt-core to its latest version and adapts to the respective changes.
- Loading branch information
1 parent
cf34a8b
commit e6d24e5
Showing
8 changed files
with
63 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Update MQT Core | ||
on: | ||
schedule: | ||
# run once a month on the first day of the month at 00:00 UTC | ||
- cron: "0 0 1 * *" | ||
workflow_dispatch: | ||
inputs: | ||
update-to-head: | ||
description: "Update to the latest commit on the default branch" | ||
type: boolean | ||
required: false | ||
default: false | ||
pull_request: | ||
paths: | ||
- .github/workflows/update-mqt-core.yml | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update-mqt-core: | ||
name: ⬆️ Update MQT Core | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
with: | ||
update-to-head: ${{ github.event.inputs.update-to-head == 'true' }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +0,0 @@ | ||
[submodule "cpp/mqt-core"] | ||
path = cpp/mqt-core | ||
url = https://github.com/cda-tum/mqt-core.git | ||
branch = main | ||
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Declare all external dependencies and make sure that they are available. | ||
|
||
include(FetchContent) | ||
set(FETCH_PACKAGES "") | ||
|
||
# cmake-format: off | ||
set(MQT_CORE_VERSION 2.6.1 | ||
CACHE STRING "MQT Core version") | ||
set(MQT_CORE_REV "5be1c3ec4efb773d0330298621704e876afa7c16" | ||
CACHE STRING "MQT Core identifier (tag, branch or commit hash)") | ||
set(MQT_CORE_REPO_OWNER "cda-tum" | ||
CACHE STRING "MQT Core repository owner (change when using a fork)") | ||
# cmake-format: on | ||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) | ||
FetchContent_Declare( | ||
mqt-core | ||
GIT_REPOSITORY https://github.com/${MQT_CORE_REPO_OWNER}/mqt-core.git | ||
GIT_TAG ${MQT_CORE_REV} | ||
FIND_PACKAGE_ARGS ${MQT_CORE_VERSION}) | ||
list(APPEND FETCH_PACKAGES mqt-core) | ||
else() | ||
find_package(mqt-core ${MQT_CORE_VERSION} QUIET) | ||
if(NOT mqt-core_FOUND) | ||
FetchContent_Declare( | ||
mqt-core | ||
GIT_REPOSITORY https://github.com/${MQT_CORE_REPO_OWNER}/mqt-core.git | ||
GIT_TAG ${MQT_CORE_REV}) | ||
list(APPEND FETCH_PACKAGES mqt-core) | ||
endif() | ||
endif() | ||
|
||
# Make all declared dependencies available. | ||
FetchContent_MakeAvailable(${FETCH_PACKAGES}) |
This file contains 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
This file contains 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
Submodule mqt-core
deleted from
aa3b3b