File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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)
912endfunction ()
You can’t perform that action at this time.
0 commit comments