Skip to content

Commit

Permalink
Add dependency between external libraries and mlir-headers to attempt…
Browse files Browse the repository at this point in the history
… to fix the missing QUIRTypes.h.inc error
  • Loading branch information
mbhealy committed Jul 27, 2023
1 parent f55c894 commit fd85016
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ endforeach()
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCE_FILES})

add_library(qss-compiler-opt ${SOURCE_FILES})
add_dependencies(qss-compiler-opt mlir-headers)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
Expand Down
2 changes: 1 addition & 1 deletion lib/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ target_sources(QSSCAPI
FILES ${QSSC_INCLUDE_DIR}/API/api.h ${QSSC_INCLUDE_DIR}/API/error.h
)

add_dependencies(QSSCAPI QSSCError MLIROQ3Dialect MLIRQCSDialect MLIRQUIRDialect)
add_dependencies(QSSCAPI QSSCError MLIROQ3Dialect MLIRQCSDialect MLIRQUIRDialect mlir-headers)
3 changes: 3 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ set(SOURCES
QSSC.cpp
)
add_library(QSSCCore ${SOURCES})
add_dependencies(QSSCCore mlir-headers)

get_property(qssc_targets GLOBAL PROPERTY QSSC_TARGETS)
get_property(mlir_dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
Expand Down Expand Up @@ -59,6 +60,7 @@ set_property(GLOBAL PROPERTY QSSC_API_LIBS ${qssc_api_libs})
# INTERFACE and dependencies to all targets that refer to the library yet does
# not materialize as an artifact by itself
add_library(QSSCLib INTERFACE)
add_dependencies(QSSCLib mlir-headers)
target_link_libraries(QSSCLib INTERFACE ${qssc_api_libs})

if(INSTALL_BUNDLED_STATIC_LIB)
Expand All @@ -67,6 +69,7 @@ if(INSTALL_BUNDLED_STATIC_LIB)
# If you consider adding that support, MacOS's libtool could be an option since it appears capable of bundling static libraries.
endif()
add_library(QSSCompiler STATIC API/api.cpp)
add_dependencies(QSSCompiler mlir-headers)
target_link_libraries(QSSCompiler PUBLIC
${qssc_targets}
QSSCAPI
Expand Down

0 comments on commit fd85016

Please sign in to comment.