CMake: Support for cross-compiling. For now, requires a previously
[oota-llvm.git] / tools / llvmc2 / driver / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS support system)
2 set(LLVM_REQUIRES_EH 1)
3
4 macro(tgen ofn)
5   add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
6     COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_SOURCE_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Graph.td -o ${ofn}
7     DEPENDS
8     tblgen
9     ${LLVM_MAIN_INCLUDE_DIR}/llvm/CompilerDriver/Common.td
10     ${LLVM_MAIN_INCLUDE_DIR}/llvm/CompilerDriver/Tools.td
11     COMMENT "Building ${ofn}..."
12     )
13 endmacro(tgen ofn)
14
15 # tgen(AutoGenerated.inc -gen-llvmc)
16
17 # add_custom_target(AutoGenerated_ct echo Tablegenning
18 #   DEPENDS
19 #   ${CMAKE_CURRENT_BINARY_DIR}/AutoGenerated.inc
20 #   )
21
22 include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
23
24 add_llvm_tool(llvmc2
25   Action.cpp
26   CompilationGraph.cpp
27   llvmc.cpp
28   Plugin.cpp
29   )
30
31 # add_dependencies(llvmc2 AutoGenerated_ct)