llvm.org GIT mirror llvm / ba6fc63
Allow absolute paths in LLVM_TARGET_DEFINITIONS for CMake's TableGen rule git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106219 91177308-0d34-0410-b5e6-96231b3b80d8 Douglas Gregor 9 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
55 file(GLOB local_tds "*.td")
66 file(GLOB_RECURSE global_tds "${LLVM_MAIN_SRC_DIR}/include/llvm/*.td")
77
8 if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
9 set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
10 else()
11 set(LLVM_TARGET_DEFINITIONS_ABSOLUTE
12 ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS})
13 endif()
814 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
915 COMMAND ${LLVM_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
1016 -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR}
11 ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS}
17 ${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
1218 -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
1319 DEPENDS tblgen ${local_tds} ${global_tds}
1420 COMMENT "Building ${ofn}..."