Skip to content

Commit 180f3a5

Browse files
committed
hopefully fix CMake problems
1 parent 29581b7 commit 180f3a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mlir/cmake/modules/IRDLToCpp.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ function(add_irdl_to_cpp_target target irdl_file)
22
add_custom_command(
33
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${irdl_file}.cpp.inc
44
COMMAND ${MLIR_IRDL_TO_CPP_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/${irdl_file} -o ${CMAKE_CURRENT_BINARY_DIR}/${irdl_file}.cpp.inc
5-
DEPENDS ${MLIR_IRDL_TO_CPP_TARGET} ${irdl_file}
5+
6+
# The command output depends on the executable to ensure IRDL sources are properly rebuilt
7+
# if the tool changes.
8+
DEPENDS ${MLIR_IRDL_TO_CPP_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/${irdl_file}
69
COMMENT "Building ${irdl_file}..."
710
)
8-
add_custom_target(${target} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${irdl_file}.cpp.inc)
11+
add_custom_target(${target} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${irdl_file}.cpp.inc)
912
endfunction()

0 commit comments

Comments
 (0)