[CMake] Let add_public_tablegen_target responsible to provide dependency to CommonTableGen.

add_public_tablegen_target adds *CommonTableGen to LLVM_COMMON_DEPENDS.
LLVM_COMMON_DEPENDS affects add_llvm_library (and other add_target stuff) within its scope.

llvm-svn: 195927
This commit is contained in:
NAKAMURA Takumi 2013-11-28 17:04:04 +00:00
parent 848493d886
commit ce746c6c49
62 changed files with 14 additions and 111 deletions

View File

@ -45,7 +45,7 @@ macro(tablegen project ofn)
PROPERTIES GENERATED 1)
endmacro(tablegen)
function(add_public_tablegen_target target)
macro(add_public_tablegen_target target)
# Creates a target for publicly exporting tablegen dependencies.
if( TABLEGEN_OUTPUT )
add_custom_target(${target}
@ -54,8 +54,9 @@ function(add_public_tablegen_target target)
add_dependencies(${target} ${LLVM_COMMON_DEPENDS})
endif ()
set_target_properties(${target} PROPERTIES FOLDER "Tablegenning")
list(APPEND LLVM_COMMON_DEPENDS ${target})
endif( TABLEGEN_OUTPUT )
endfunction()
endmacro()
if(CMAKE_CROSSCOMPILING)
set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native")

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMAArch64AsmParser
AArch64AsmParser.cpp
)
add_dependencies(LLVMAArch64AsmParser AArch64CommonTableGen)

View File

@ -28,8 +28,6 @@ add_llvm_target(AArch64CodeGen
AArch64TargetObjectFile.cpp
)
add_dependencies(LLVMAArch64CodeGen AArch64CommonTableGen)
add_subdirectory(AsmParser)
add_subdirectory(Disassembler)
add_subdirectory(InstPrinter)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMAArch64Disassembler
AArch64Disassembler.cpp
)
add_dependencies(LLVMAArch64Disassembler AArch64CommonTableGen)

View File

@ -1,6 +1,3 @@
add_llvm_library(LLVMAArch64AsmPrinter
AArch64InstPrinter.cpp
)
add_dependencies(LLVMAArch64AsmPrinter AArch64CommonTableGen)

View File

@ -7,4 +7,3 @@ add_llvm_library(LLVMAArch64Desc
AArch64MCExpr.cpp
AArch64MCTargetDesc.cpp
)
add_dependencies(LLVMAArch64Desc AArch64CommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMAArch64Info
AArch64TargetInfo.cpp
)
add_dependencies(LLVMAArch64Info AArch64CommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMAArch64Utils
AArch64BaseInfo.cpp
)
add_dependencies(LLVMAArch64Utils AArch64CommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMARMAsmParser
ARMAsmParser.cpp
)
add_dependencies(LLVMARMAsmParser ARMCommonTableGen)

View File

@ -49,7 +49,7 @@ add_llvm_target(ARMCodeGen
Thumb2SizeReduction.cpp
)
add_dependencies(LLVMARMCodeGen ARMCommonTableGen intrinsics_gen)
add_dependencies(LLVMARMCodeGen intrinsics_gen)
# workaround for hanging compilation on MSVC9, 10
if( MSVC_VERSION EQUAL 1600 OR MSVC_VERSION EQUAL 1500 )

View File

@ -8,4 +8,3 @@ set_property(
PROPERTY COMPILE_FLAGS "/Od"
)
endif()
add_dependencies(LLVMARMDisassembler ARMCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMARMAsmPrinter
ARMInstPrinter.cpp
)
add_dependencies(LLVMARMAsmPrinter ARMCommonTableGen)

View File

@ -11,4 +11,3 @@ add_llvm_library(LLVMARMDesc
ARMUnwindOpAsm.cpp
ARMMachORelocationInfo.cpp
)
add_dependencies(LLVMARMDesc ARMCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMARMInfo
ARMTargetInfo.cpp
)
add_dependencies(LLVMARMInfo ARMCommonTableGen)

View File

@ -37,7 +37,7 @@ add_llvm_target(HexagonCodeGen
HexagonCopyToCombine.cpp
)
add_dependencies(LLVMHexagonCodeGen HexagonCommonTableGen intrinsics_gen)
add_dependencies(LLVMHexagonCodeGen intrinsics_gen)
add_subdirectory(TargetInfo)
add_subdirectory(InstPrinter)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMHexagonAsmPrinter
HexagonInstPrinter.cpp
)
add_dependencies(LLVMHexagonAsmPrinter HexagonCommonTableGen)

View File

@ -3,5 +3,3 @@ add_llvm_library(LLVMHexagonDesc
HexagonMCInst.cpp
HexagonMCTargetDesc.cpp
)
add_dependencies(LLVMHexagonDesc HexagonCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMHexagonInfo
HexagonTargetInfo.cpp
)
add_dependencies(LLVMHexagonInfo HexagonCommonTableGen)

View File

@ -23,7 +23,7 @@ add_llvm_target(MSP430CodeGen
MSP430MCInstLower.cpp
)
add_dependencies(LLVMMSP430CodeGen MSP430CommonTableGen intrinsics_gen)
add_dependencies(LLVMMSP430CodeGen intrinsics_gen)
add_subdirectory(InstPrinter)
add_subdirectory(TargetInfo)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMMSP430AsmPrinter
MSP430InstPrinter.cpp
)
add_dependencies(LLVMMSP430AsmPrinter MSP430CommonTableGen)

View File

@ -2,5 +2,3 @@ add_llvm_library(LLVMMSP430Desc
MSP430MCTargetDesc.cpp
MSP430MCAsmInfo.cpp
)
add_dependencies(LLVMMSP430Desc MSP430CommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMMSP430Info
MSP430TargetInfo.cpp
)
add_dependencies(LLVMMSP430Info MSP430CommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMMipsAsmParser
MipsAsmParser.cpp
)
add_dependencies(LLVMMipsAsmParser MipsCommonTableGen)

View File

@ -48,7 +48,7 @@ add_llvm_target(MipsCodeGen
MipsSelectionDAGInfo.cpp
)
add_dependencies(LLVMMipsCodeGen MipsCommonTableGen intrinsics_gen)
add_dependencies(LLVMMipsCodeGen intrinsics_gen)
add_subdirectory(InstPrinter)
add_subdirectory(Disassembler)

View File

@ -9,5 +9,3 @@ set_property(
PROPERTY COMPILE_FLAGS "/Od"
)
endif()
add_dependencies(LLVMMipsDisassembler MipsCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMMipsAsmPrinter
MipsInstPrinter.cpp
)
add_dependencies(LLVMMipsAsmPrinter MipsCommonTableGen)

View File

@ -7,5 +7,3 @@ add_llvm_library(LLVMMipsDesc
MipsReginfo.cpp
MipsTargetStreamer.cpp
)
add_dependencies(LLVMMipsDesc MipsCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMMipsInfo
MipsTargetInfo.cpp
)
add_dependencies(LLVMMipsInfo MipsCommonTableGen)

View File

@ -30,7 +30,7 @@ set(NVPTXCodeGen_sources
add_llvm_target(NVPTXCodeGen ${NVPTXCodeGen_sources})
add_dependencies(LLVMNVPTXCodeGen NVPTXCommonTableGen intrinsics_gen)
add_dependencies(LLVMNVPTXCodeGen intrinsics_gen)
add_subdirectory(TargetInfo)
add_subdirectory(InstPrinter)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMNVPTXAsmPrinter
NVPTXInstPrinter.cpp
)
add_dependencies(LLVMNVPTXAsmPrinter NVPTXCommonTableGen)

View File

@ -2,5 +2,3 @@ add_llvm_library(LLVMNVPTXDesc
NVPTXMCAsmInfo.cpp
NVPTXMCTargetDesc.cpp
)
add_dependencies(LLVMNVPTXDesc NVPTXCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMNVPTXInfo
NVPTXTargetInfo.cpp
)
add_dependencies(LLVMNVPTXInfo NVPTXCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMPowerPCAsmParser
PPCAsmParser.cpp
)
add_dependencies(LLVMPowerPCAsmParser PowerPCCommonTableGen)

View File

@ -34,7 +34,7 @@ add_llvm_target(PowerPCCodeGen
PPCSelectionDAGInfo.cpp
)
add_dependencies(LLVMPowerPCCodeGen PowerPCCommonTableGen intrinsics_gen)
add_dependencies(LLVMPowerPCCodeGen intrinsics_gen)
add_subdirectory(AsmParser)
add_subdirectory(InstPrinter)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMPowerPCAsmPrinter
PPCInstPrinter.cpp
)
add_dependencies(LLVMPowerPCAsmPrinter PowerPCCommonTableGen)

View File

@ -8,5 +8,3 @@ add_llvm_library(LLVMPowerPCDesc
PPCMachObjectWriter.cpp
PPCELFObjectWriter.cpp
)
add_dependencies(LLVMPowerPCDesc PowerPCCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMPowerPCInfo
PowerPCTargetInfo.cpp
)
add_dependencies(LLVMPowerPCInfo PowerPCCommonTableGen)

View File

@ -50,7 +50,7 @@ add_llvm_target(R600CodeGen
SITypeRewriter.cpp
)
add_dependencies(LLVMR600CodeGen AMDGPUCommonTableGen intrinsics_gen)
add_dependencies(LLVMR600CodeGen intrinsics_gen)
add_subdirectory(InstPrinter)
add_subdirectory(TargetInfo)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMR600AsmPrinter
AMDGPUInstPrinter.cpp
)
add_dependencies(LLVMR600AsmPrinter AMDGPUCommonTableGen)

View File

@ -8,5 +8,3 @@ add_llvm_library(LLVMR600Desc
R600MCCodeEmitter.cpp
SIMCCodeEmitter.cpp
)
add_dependencies(LLVMR600Desc AMDGPUCommonTableGen)

View File

@ -2,4 +2,4 @@ add_llvm_library(LLVMR600Info
AMDGPUTargetInfo.cpp
)
add_dependencies(LLVMR600Info AMDGPUCommonTableGen intrinsics_gen)
add_dependencies(LLVMR600Info intrinsics_gen)

View File

@ -25,7 +25,7 @@ add_llvm_target(SparcCodeGen
SparcCodeEmitter.cpp
)
add_dependencies(LLVMSparcCodeGen SparcCommonTableGen intrinsics_gen)
add_dependencies(LLVMSparcCodeGen intrinsics_gen)
add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc)

View File

@ -2,5 +2,3 @@ add_llvm_library(LLVMSparcDesc
SparcMCTargetDesc.cpp
SparcMCAsmInfo.cpp
)
add_dependencies(LLVMSparcDesc SparcCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMSparcInfo
SparcTargetInfo.cpp
)
add_dependencies(LLVMSparcInfo SparcCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMSystemZAsmParser
SystemZAsmParser.cpp
)
add_dependencies(LLVMSystemZAsmParser SystemZCommonTableGen)

View File

@ -30,8 +30,6 @@ add_llvm_target(SystemZCodeGen
SystemZTargetMachine.cpp
)
add_dependencies(LLVMSystemZCodeGen SystemZCommonTableGen intrinsics_gen)
add_subdirectory(AsmParser)
add_subdirectory(Disassembler)
add_subdirectory(InstPrinter)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMSystemZDisassembler
SystemZDisassembler.cpp
)
add_dependencies(LLVMSystemZDisassembler SystemZCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMSystemZAsmPrinter
SystemZInstPrinter.cpp
)
add_dependencies(LLVMSystemZAsmPrinter SystemZCommonTableGen)

View File

@ -5,5 +5,3 @@ add_llvm_library(LLVMSystemZDesc
SystemZMCObjectWriter.cpp
SystemZMCTargetDesc.cpp
)
add_dependencies(LLVMSystemZDesc SystemZCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMSystemZInfo
SystemZTargetInfo.cpp
)
add_dependencies(LLVMSystemZInfo SystemZCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMX86AsmParser
X86AsmParser.cpp
)
add_dependencies(LLVMX86AsmParser X86CommonTableGen)

View File

@ -53,7 +53,7 @@ endif()
add_llvm_target(X86CodeGen ${sources})
add_dependencies(LLVMX86CodeGen X86CommonTableGen intrinsics_gen)
add_dependencies(LLVMX86CodeGen intrinsics_gen)
add_subdirectory(AsmParser)
add_subdirectory(Disassembler)

View File

@ -10,5 +10,3 @@ set_property(
PROPERTY COMPILE_FLAGS "/Od"
)
endif()
add_dependencies(LLVMX86Disassembler X86CommonTableGen)

View File

@ -3,5 +3,3 @@ add_llvm_library(LLVMX86AsmPrinter
X86IntelInstPrinter.cpp
X86InstComments.cpp
)
add_dependencies(LLVMX86AsmPrinter X86CommonTableGen)

View File

@ -9,5 +9,3 @@ add_llvm_library(LLVMX86Desc
X86MachORelocationInfo.cpp
X86ELFRelocationInfo.cpp
)
add_dependencies(LLVMX86Desc X86CommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMX86Info
X86TargetInfo.cpp
)
add_dependencies(LLVMX86Info X86CommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMX86Utils
X86ShuffleDecode.cpp
)
add_dependencies(LLVMX86Utils X86CommonTableGen)

View File

@ -26,7 +26,7 @@ add_llvm_target(XCoreCodeGen
XCoreSelectionDAGInfo.cpp
)
add_dependencies(LLVMXCoreCodeGen XCoreCommonTableGen intrinsics_gen)
add_dependencies(LLVMXCoreCodeGen intrinsics_gen)
add_subdirectory(Disassembler)
add_subdirectory(InstPrinter)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMXCoreDisassembler
XCoreDisassembler.cpp
)
add_dependencies(LLVMXCoreDisassembler XCoreCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMXCoreAsmPrinter
XCoreInstPrinter.cpp
)
add_dependencies(LLVMXCoreAsmPrinter XCoreCommonTableGen)

View File

@ -2,5 +2,3 @@ add_llvm_library(LLVMXCoreDesc
XCoreMCTargetDesc.cpp
XCoreMCAsmInfo.cpp
)
add_dependencies(LLVMXCoreDesc XCoreCommonTableGen)

View File

@ -1,5 +1,3 @@
add_llvm_library(LLVMXCoreInfo
XCoreTargetInfo.cpp
)
add_dependencies(LLVMXCoreInfo XCoreCommonTableGen)