Skip to content

Commit

Permalink
馃П Include MQT Core via FetchContent instead as submodule (#455)
Browse files Browse the repository at this point in the history
## Description

[MQT Core](https://github.com/cda-tum/mqt-core) was included as a
submodule so far. This PR removes this submodule and uses the existing
fetch content commands to include this dependency.

Furthermore, it adds a dependabot-like update workflow for the
FetchContent-managed mqt-core dependency.

## 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 <burgholzer@me.com>
Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
  • Loading branch information
ystade and burgholzer committed Jun 19, 2024
1 parent 7a66898 commit 06a0c22
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/update-mqt-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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:
pull_request:
paths:
- .github/workflows/update-mqt-core.yml

jobs:
update-mqt-core:
name: 猬嗭笍 Update MQT Core
uses: cda-tum/mqt-workflows/.github/workflows/reusable-mqt-core-update.yml@v1.1.0
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "extern/mqt-core"]
path = extern/mqt-core
url = https://github.com/cda-tum/mqt-core.git
branch = main
17 changes: 7 additions & 10 deletions cmake/ExternalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@ if(BUILD_MQT_QMAP_BINDINGS)
find_package(pybind11 CONFIG REQUIRED)
endif()

set(FETCHCONTENT_SOURCE_DIR_MQT-CORE
${PROJECT_SOURCE_DIR}/extern/mqt-core
CACHE
PATH
"Path to the source directory of the mqt-core library. This variable is used by FetchContent to download the library if it is not already available."
)
set(MQT_CORE_VERSION
2.2.2
# cmake-format: off
set(MQT_CORE_VERSION 2.5.1
CACHE STRING "MQT Core version")
set(MQT_CORE_REV "0e4ff9e0521886449027b252c65913e1afa863b0"
CACHE STRING "MQT Core identifier (tag, branch or commit hash)")
# cmake-format: on
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
FetchContent_Declare(
mqt-core
GIT_REPOSITORY https://github.com/cda-tum/mqt-core.git
GIT_TAG v${MQT_CORE_VERSION}
GIT_TAG ${MQT_CORE_REV}
FIND_PACKAGE_ARGS ${MQT_CORE_VERSION})
list(APPEND FETCH_PACKAGES mqt-core)
else()
Expand All @@ -48,7 +45,7 @@ else()
FetchContent_Declare(
mqt-core
GIT_REPOSITORY https://github.com/cda-tum/mqt-core.git
GIT_TAG v${MQT_CORE_VERSION})
GIT_TAG ${MQT_CORE_REV})
list(APPEND FETCH_PACKAGES mqt-core)
endif()
endif()
Expand Down
1 change: 0 additions & 1 deletion extern/mqt-core
Submodule mqt-core deleted from 0e4ff9

0 comments on commit 06a0c22

Please sign in to comment.