llvm.org GIT mirror llvm / cccecb8
CMake: Use LLVM_MAIN_SRC_DIR instead of CMAKE_SOURCE_DIR, for consistency. Patch by Kevin Andre! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59326 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 10 years ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
184184 foreach(t ${LLVM_TARGETS_TO_BUILD})
185185 message(STATUS "Targeting ${t}")
186186 add_subdirectory(lib/Target/${t})
187 if( EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt )
187 if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt )
188188 add_subdirectory(lib/Target/${t}/AsmPrinter)
189 endif( EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt )
189 endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt )
190190 endforeach(t)
191191
192192 add_subdirectory(lib/ExecutionEngine)
44 macro(tablegen ofn)
55 file(GLOB all_tds "*.td")
66 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
7 COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_SOURCE_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${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}
88 DEPENDS tblgen ${all_tds}
99 COMMENT "Building ${ofn}..."
1010 )