Skip to content

Commit 2ce8325

Browse files
burgholzerdenialhaag
authored andcommitted
🚸 expose MQT_CORE_VERSION as part of the add_mqt_core_library macro
Signed-off-by: burgholzer <burgholzer@me.com>
1 parent a23fc55 commit 2ce8325

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ if(NOT TARGET ${TARGET_NAME})
5353
PARENT_SCOPE)
5454

5555
# 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}")
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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ if(NOT TARGET ${TARGET_NAME})
144144
PARENT_SCOPE)
145145

146146
# 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}")
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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ if(NOT TARGET ${TARGET_NAME})
144144
PARENT_SCOPE)
145145

146146
# 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}")
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)