llvm.org GIT mirror llvm / beb7a05
CMake: Do not rebuild the world when tblgen changes but the .inc files it produces are not affected by the change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59763 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 10 years ago
1 changed file(s) with 9 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
33
44 macro(tablegen ofn)
55 file(GLOB all_tds "*.td")
6 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
7 COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
8 -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR}
9 ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${ofn}.tmp
10 DEPENDS ${LLVM_TABLEGEN} ${all_tds}
11 COMMENT "Building ${ofn}.tmp..."
12 )
613 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
7 COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${ofn}
8 DEPENDS tblgen ${all_tds}
14 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ofn}.tmp ${ofn}
15 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
916 COMMENT "Building ${ofn}..."
1017 )
1118 set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn})