Skip to content

Commit 03cfba4

Browse files
authored
[MLIR][IRDL][CMake] CMake fixes for cross-compilation (#145672)
The PR fixes a misconfigured dependency that causes CMake error "No rule to make target 'NATIVE/bin/mlir-irdl-to-cpp'" for cross-compilation.
1 parent 0437895 commit 03cfba4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/cmake/modules/IRDLToCpp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function(add_irdl_to_cpp_target target irdl_file)
55

66
# The command output depends on the executable to ensure IRDL sources are properly rebuilt
77
# if the tool changes.
8-
DEPENDS ${MLIR_IRDL_TO_CPP_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/${irdl_file}
8+
DEPENDS ${MLIR_IRDL_TO_CPP_TARGET} ${MLIR_IRDL_TO_CPP_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/${irdl_file}
99
COMMENT "Building ${irdl_file}..."
1010
)
1111
add_custom_target(${target} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${irdl_file}.cpp.inc)

0 commit comments

Comments
 (0)