mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-28 14:32:51 +01:00
bb9c221f2a
built native tblgen which is passed to cmake in the variable LLVM_TABLEGEN. See http://www.cmake.org/Wiki/CmakeMingw for a quick example on how to cross-compile with CMake. llvm-svn: 58939
32 lines
866 B
CMake
32 lines
866 B
CMake
set(LLVM_LINK_COMPONENTS support system)
|
|
set(LLVM_REQUIRES_EH 1)
|
|
|
|
macro(tgen ofn)
|
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
|
|
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}
|
|
DEPENDS
|
|
tblgen
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/CompilerDriver/Common.td
|
|
${LLVM_MAIN_INCLUDE_DIR}/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)
|