Skip to content

Commit 362a56f

Browse files
authored
🚸 expose MQT_CORE_VERSION as part of the add_mqt_core_library macro (#1409)
## Description Picking apart #1403 even more. This small PR directly exposes the MQT Core version as part of the CMake library macro. ## 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 focused and relevant to this change. - [x] I have added appropriate tests that cover the new/changed functionality. - [x] I have updated the documentation to reflect these changes. - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] I have added migration instructions to the upgrade guide (if needed). - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes. Signed-off-by: burgholzer <burgholzer@me.com>
1 parent f748baa commit 362a56f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

‎cmake/AddMQTCoreLibrary.cmake‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,7 @@ function(add_mqt_core_library name)
4747
PROPERTIES VERSION ${PROJECT_VERSION}
4848
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
4949
EXPORT_NAME Core${ARG_ALIAS_NAME})
50+
51+
# Make version available
52+
target_compile_definitions(${name} PRIVATE MQT_CORE_VERSION="${MQT_CORE_VERSION}")
5053
endfunction()

‎src/qdmi/dd/CMakeLists.txt‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ if(NOT TARGET ${TARGET_NAME})
5252
${MQT_CORE_TARGETS} ${TARGET_NAME}
5353
PARENT_SCOPE)
5454

55-
# Make QDMI and MQT Core Version available
56-
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}"
57-
MQT_CORE_VERSION="${MQT_CORE_VERSION}")
55+
# Make QDMI version available
56+
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}")
5857

5958
# Generate additional alias for the target required for generate_device_defs_executable function
6059
# in the tests

‎src/qdmi/na/CMakeLists.txt‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ if(NOT TARGET ${TARGET_NAME})
143143
${MQT_CORE_TARGETS} ${TARGET_NAME}
144144
PARENT_SCOPE)
145145

146-
# Make QDMI and MQT Core Version available
147-
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}"
148-
MQT_CORE_VERSION="${MQT_CORE_VERSION}")
146+
# Make QDMI version available
147+
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}")
149148

150149
# Generate additional alias for the target required for generate_device_defs_executable function
151150
# in the tests

‎src/qdmi/sc/CMakeLists.txt‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ if(NOT TARGET ${TARGET_NAME})
143143
${MQT_CORE_TARGETS} ${TARGET_NAME}
144144
PARENT_SCOPE)
145145

146-
# Make QDMI and MQT Core Version available
147-
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}"
148-
MQT_CORE_VERSION="${MQT_CORE_VERSION}")
146+
# Make QDMI version available
147+
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}")
149148

150149
# Generate additional alias for the target required for generate_device_defs_executable function
151150
# in the tests

0 commit comments

Comments
 (0)