File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ if(ENABLE_COVERAGE)
1515 add_link_options (--coverage )
1616endif ()
1717
18+ # Conditionally set SHARED keyword for shared library builds
19+ if (BUILD_MQT_CORE_SHARED_LIBS)
20+ set (MQT_CORE_MLIR_LIBRARY_TYPE SHARED)
21+ else ()
22+ set (MQT_CORE_MLIR_LIBRARY_TYPE)
23+ endif ()
24+
1825# add main library code
1926add_subdirectory (include )
2027add_subdirectory (lib )
Original file line number Diff line number Diff line change 88
99file (GLOB CONVERSION_SOURCES *.cpp )
1010
11- add_mlir_library (MQTOptToMQTRef ${CONVERSION_SOURCES} DEPENDS MQTOptToMQTRefIncGen )
11+ add_mlir_library (
12+ MQTOptToMQTRef
13+ ${CONVERSION_SOURCES}
14+ DEPENDS
15+ MQTOptToMQTRefIncGen
16+ LINK_LIBS
17+ MLIRMQTOpt
18+ MLIRMQTRef
19+ MLIRMemRefDialect
20+ MLIRTransforms
21+ MLIRFuncDialect
22+ MLIRFuncTransforms )
Original file line number Diff line number Diff line change 88
99file (GLOB CONVERSION_SOURCES *.cpp )
1010
11- add_mlir_library (MQTRefToMQTOpt ${CONVERSION_SOURCES} DEPENDS MQTRefToMQTOptIncGen )
11+ add_mlir_library (
12+ MQTRefToMQTOpt
13+ ${CONVERSION_SOURCES}
14+ DEPENDS
15+ MQTRefToMQTOptIncGen
16+ LINK_LIBS
17+ MLIRMQTOpt
18+ MLIRMQTRef
19+ MLIRMemRefDialect
20+ MLIRTransforms
21+ MLIRFuncDialect
22+ MLIRFuncTransforms )
Original file line number Diff line number Diff line change 88
99file (GLOB CONVERSION_SOURCES *.cpp )
1010
11- add_mlir_library (MQTRefToQIR ${CONVERSION_SOURCES} DEPENDS MQTRefToQIRIncGen )
11+ add_mlir_library (
12+ MQTRefToQIR
13+ ${CONVERSION_SOURCES}
14+ DEPENDS
15+ MQTRefToQIRIncGen
16+ LINK_LIBS
17+ MLIRMQTRef
18+ MLIRMemRefDialect
19+ MLIRTransforms
20+ MLIRLLVMDialect
21+ MLIRFuncToLLVM
22+ MLIRReconcileUnrealizedCasts )
Original file line number Diff line number Diff line change 88
99file (GLOB CONVERSION_SOURCES *.cpp )
1010
11- add_mlir_library (QIRToMQTRef ${CONVERSION_SOURCES} DEPENDS QIRToMQTRefIncGen )
11+ add_mlir_library (
12+ QIRToMQTRef
13+ ${CONVERSION_SOURCES}
14+ DEPENDS
15+ QIRToMQTRefIncGen
16+ LINK_LIBS
17+ MLIRMQTRef
18+ MLIRMemRefDialect
19+ MLIRTransforms
20+ MLIRLLVMDialect )
Original file line number Diff line number Diff line change 66#
77# Licensed under the MIT License
88
9- add_mlir_dialect_library (MLIRMQTOpt MQTOptOps.cpp DEPENDS MLIRMQTOptOpsIncGen
10- MLIRMQTOptInterfacesIncGen )
9+ add_mlir_dialect_library (
10+ MLIRMQTOpt
11+ ${MQT_CORE_MLIR_LIBRARY_TYPE}
12+ MQTOptOps.cpp
13+ DEPENDS
14+ MLIRMQTOptOpsIncGen
15+ MLIRMQTOptInterfacesIncGen
16+ LINK_LIBS
17+ MLIRIR
18+ MLIRInferTypeOpInterface )
1119# collect header files
1220file (GLOB_RECURSE IR_HEADERS_SOURCE "${MQT_MLIR_SOURCE_INCLUDE_DIR} /mlir/Dialect/MQTOpt/IR/*.h" )
1321file (GLOB_RECURSE IR_HEADERS_BUILD "${MQT_MLIR_BUILD_INCLUDE_DIR} /mlir/Dialect/MQTOpt/IR/*.inc" )
Original file line number Diff line number Diff line change 66#
77# Licensed under the MIT License
88
9- add_mlir_dialect_library (MLIRMQTRef MQTRefOps.cpp DEPENDS MLIRMQTRefOpsIncGen
10- MLIRMQTRefInterfacesIncGen )
9+ add_mlir_dialect_library (
10+ MLIRMQTRef
11+ ${MQT_CORE_MLIR_LIBRARY_TYPE}
12+ MQTRefOps.cpp
13+ DEPENDS
14+ MLIRMQTRefOpsIncGen
15+ MLIRMQTRefInterfacesIncGen
16+ LINK_LIBS
17+ MLIRIR
18+ MLIRInferTypeOpInterface )
1119
1220# collect header files
1321file (GLOB_RECURSE IR_HEADERS_SOURCE "${MQT_MLIR_SOURCE_INCLUDE_DIR} /mlir/Dialect/MQTRef/IR/*.h" )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ add_compile_options(-fexceptions)
1010
1111add_mlir_library (
1212 MLIRMQTRefTranslation
13+ ${MQT_CORE_MLIR_LIBRARY_TYPE}
1314 ImportQuantumComputation.cpp
1415 LINK_LIBS
1516 MLIRArithDialect
You can’t perform that action at this time.
0 commit comments