diff options
Diffstat (limited to 'tools/llvmc2/driver/CMakeLists.txt')
-rw-r--r-- | tools/llvmc2/driver/CMakeLists.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/llvmc2/driver/CMakeLists.txt b/tools/llvmc2/driver/CMakeLists.txt new file mode 100644 index 0000000..057ef40 --- /dev/null +++ b/tools/llvmc2/driver/CMakeLists.txt @@ -0,0 +1,31 @@ +set(LLVM_LINK_COMPONENTS support system) +set(LLVM_REQUIRES_EH 1) + +macro(tgen ofn) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn} + COMMAND tblgen ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_SOURCE_DIR}/lib/Target -I ${llvm_include_path} ${CMAKE_CURRENT_SOURCE_DIR}/Graph.td -o ${ofn} + DEPENDS + tblgen + ${llvm_include_path}/llvm/CompilerDriver/Common.td + ${llvm_include_path}/llvm/CompilerDriver/Tools.td + COMMENT "Building ${ofn}..." + ) +endmacro(tgen ofn) + +# tgen(AutoGenerated.inc -gen-llvmc) + +# add_custom_target(AutoGenerated_ct echo Tablegenning +# DEPENDS +# ${CMAKE_CURRENT_BINARY_DIR}/AutoGenerated.inc +# ) + +include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) + +add_llvm_tool(llvmc2 + Action.cpp + CompilationGraph.cpp + llvmc.cpp + Plugin.cpp + ) + +# add_dependencies(llvmc2 AutoGenerated_ct) |