Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup MLIR target export in AIEConfig.cmake #911

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions cmake/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ set(AIE_CONFIG_TOOLS_BINARY_DIR "${PROJECT_BINARY_DIR}/bin")
set(AIE_CONFIG_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include"
"${PROJECT_BINARY_DIR}/include")
set(AIE_CONFIG_EXPORTS_FILE "\${AIE_CMAKE_DIR}/AIETargets.cmake")
set(MLIR_CONFIG_INCLUDE_EXPORTS_FILE "\${MLIR_DIR}/MLIRTargets.cmake")
set(AIE_CONFIG_LibXAIE_x86_64_DIR)
if("x86_64" IN_LIST AIE_RUNTIME_TARGETS)
set(AIE_CONFIG_LibXAIE_x86_64_DIR
Expand Down Expand Up @@ -59,7 +60,7 @@ set(AIE_CONFIG_BINARY_DIR "\${AIE_INSTALL_PREFIX}")
set(AIE_CONFIG_TOOLS_BINARY_DIR "\${AIE_INSTALL_PREFIX}/bin")
set(AIE_CONFIG_INCLUDE_DIRS "\${AIE_INSTALL_PREFIX}/include")
set(AIE_CONFIG_EXPORTS_FILE "\${AIE_CMAKE_DIR}/AIETargets.cmake")
set(MLIR_CONFIG_INCLUDE_EXPORTS_FILE "\${AIE_CMAKE_DIR}/MLIRTargets.cmake")
set(MLIR_CONFIG_INCLUDE_EXPORTS_FILE "\${MLIR_DIR}/MLIRTargets.cmake")
set(AIE_CONFIG_LibXAIE_x86_64_DIR)
if("x86_64" IN_LIST AIE_RUNTIME_TARGETS)
set(AIE_CONFIG_LibXAIE_x86_64_DIR
Expand Down Expand Up @@ -87,10 +88,6 @@ install(
EXPORT AIETargets
DESTINATION ${AIE_INSTALL_PACKAGE_DIR}
COMPONENT aie-cmake-exports)
install(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transcribing offline discussion: this is necessary to support downstream users because of how add_mlir_library works.

EXPORT MLIRTargets
DESTINATION ${AIE_INSTALL_PACKAGE_DIR}
COMPONENT aie-cmake-exports)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/AIEConfig.cmake
DESTINATION ${AIE_INSTALL_PACKAGE_DIR}
Expand Down
Loading