llvm.org GIT mirror llvm / ad36318
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195927 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 6 years ago
62 changed file(s) with 14 addition(s) and 111 deletion(s). Raw diff Collapse all Expand all
4444 PROPERTIES GENERATED 1)
4545 endmacro(tablegen)
4646
47 function(add_public_tablegen_target target)
47 macro(add_public_tablegen_target target)
4848 # Creates a target for publicly exporting tablegen dependencies.
4949 if( TABLEGEN_OUTPUT )
5050 add_custom_target(${target}
5353 add_dependencies(${target} ${LLVM_COMMON_DEPENDS})
5454 endif ()
5555 set_target_properties(${target} PROPERTIES FOLDER "Tablegenning")
56 list(APPEND LLVM_COMMON_DEPENDS ${target})
5657 endif( TABLEGEN_OUTPUT )
57 endfunction()
58 endmacro()
5859
5960 if(CMAKE_CROSSCOMPILING)
6061 set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native")
0 add_llvm_library(LLVMAArch64AsmParser
11 AArch64AsmParser.cpp
22 )
3
4 add_dependencies(LLVMAArch64AsmParser AArch64CommonTableGen)
2727 AArch64TargetObjectFile.cpp
2828 )
2929
30 add_dependencies(LLVMAArch64CodeGen AArch64CommonTableGen)
31
3230 add_subdirectory(AsmParser)
3331 add_subdirectory(Disassembler)
3432 add_subdirectory(InstPrinter)
0 add_llvm_library(LLVMAArch64Disassembler
11 AArch64Disassembler.cpp
22 )
3
4 add_dependencies(LLVMAArch64Disassembler AArch64CommonTableGen)
0 add_llvm_library(LLVMAArch64AsmPrinter
11 AArch64InstPrinter.cpp
22 )
3
4 add_dependencies(LLVMAArch64AsmPrinter AArch64CommonTableGen)
5
66 AArch64MCExpr.cpp
77 AArch64MCTargetDesc.cpp
88 )
9 add_dependencies(LLVMAArch64Desc AArch64CommonTableGen)
0 add_llvm_library(LLVMAArch64Info
11 AArch64TargetInfo.cpp
22 )
3
4 add_dependencies(LLVMAArch64Info AArch64CommonTableGen)
0 add_llvm_library(LLVMAArch64Utils
11 AArch64BaseInfo.cpp
22 )
3
4 add_dependencies(LLVMAArch64Utils AArch64CommonTableGen)
0 add_llvm_library(LLVMARMAsmParser
11 ARMAsmParser.cpp
22 )
3
4 add_dependencies(LLVMARMAsmParser ARMCommonTableGen)
4848 Thumb2SizeReduction.cpp
4949 )
5050
51 add_dependencies(LLVMARMCodeGen ARMCommonTableGen intrinsics_gen)
51 add_dependencies(LLVMARMCodeGen intrinsics_gen)
5252
5353 # workaround for hanging compilation on MSVC9, 10
5454 if( MSVC_VERSION EQUAL 1600 OR MSVC_VERSION EQUAL 1500 )
77 PROPERTY COMPILE_FLAGS "/Od"
88 )
99 endif()
10 add_dependencies(LLVMARMDisassembler ARMCommonTableGen)
0 add_llvm_library(LLVMARMAsmPrinter
11 ARMInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMARMAsmPrinter ARMCommonTableGen)
1010 ARMUnwindOpAsm.cpp
1111 ARMMachORelocationInfo.cpp
1212 )
13 add_dependencies(LLVMARMDesc ARMCommonTableGen)
0 add_llvm_library(LLVMARMInfo
11 ARMTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMARMInfo ARMCommonTableGen)
3636 HexagonCopyToCombine.cpp
3737 )
3838
39 add_dependencies(LLVMHexagonCodeGen HexagonCommonTableGen intrinsics_gen)
39 add_dependencies(LLVMHexagonCodeGen intrinsics_gen)
4040
4141 add_subdirectory(TargetInfo)
4242 add_subdirectory(InstPrinter)
0 add_llvm_library(LLVMHexagonAsmPrinter
11 HexagonInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMHexagonAsmPrinter HexagonCommonTableGen)
22 HexagonMCInst.cpp
33 HexagonMCTargetDesc.cpp
44 )
5
6 add_dependencies(LLVMHexagonDesc HexagonCommonTableGen)
0 add_llvm_library(LLVMHexagonInfo
11 HexagonTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMHexagonInfo HexagonCommonTableGen)
2222 MSP430MCInstLower.cpp
2323 )
2424
25 add_dependencies(LLVMMSP430CodeGen MSP430CommonTableGen intrinsics_gen)
25 add_dependencies(LLVMMSP430CodeGen intrinsics_gen)
2626
2727 add_subdirectory(InstPrinter)
2828 add_subdirectory(TargetInfo)
0 add_llvm_library(LLVMMSP430AsmPrinter
11 MSP430InstPrinter.cpp
22 )
3
4 add_dependencies(LLVMMSP430AsmPrinter MSP430CommonTableGen)
11 MSP430MCTargetDesc.cpp
22 MSP430MCAsmInfo.cpp
33 )
4
5 add_dependencies(LLVMMSP430Desc MSP430CommonTableGen)
0 add_llvm_library(LLVMMSP430Info
11 MSP430TargetInfo.cpp
22 )
3
4 add_dependencies(LLVMMSP430Info MSP430CommonTableGen)
0 add_llvm_library(LLVMMipsAsmParser
11 MipsAsmParser.cpp
22 )
3
4 add_dependencies(LLVMMipsAsmParser MipsCommonTableGen)
4747 MipsSelectionDAGInfo.cpp
4848 )
4949
50 add_dependencies(LLVMMipsCodeGen MipsCommonTableGen intrinsics_gen)
50 add_dependencies(LLVMMipsCodeGen intrinsics_gen)
5151
5252 add_subdirectory(InstPrinter)
5353 add_subdirectory(Disassembler)
88 PROPERTY COMPILE_FLAGS "/Od"
99 )
1010 endif()
11
12 add_dependencies(LLVMMipsDisassembler MipsCommonTableGen)
0 add_llvm_library(LLVMMipsAsmPrinter
11 MipsInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMMipsAsmPrinter MipsCommonTableGen)
66 MipsReginfo.cpp
77 MipsTargetStreamer.cpp
88 )
9
10 add_dependencies(LLVMMipsDesc MipsCommonTableGen)
0 add_llvm_library(LLVMMipsInfo
11 MipsTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMMipsInfo MipsCommonTableGen)
2929
3030 add_llvm_target(NVPTXCodeGen ${NVPTXCodeGen_sources})
3131
32 add_dependencies(LLVMNVPTXCodeGen NVPTXCommonTableGen intrinsics_gen)
32 add_dependencies(LLVMNVPTXCodeGen intrinsics_gen)
3333
3434 add_subdirectory(TargetInfo)
3535 add_subdirectory(InstPrinter)
0 add_llvm_library(LLVMNVPTXAsmPrinter
11 NVPTXInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMNVPTXAsmPrinter NVPTXCommonTableGen)
11 NVPTXMCAsmInfo.cpp
22 NVPTXMCTargetDesc.cpp
33 )
4
5 add_dependencies(LLVMNVPTXDesc NVPTXCommonTableGen)
0 add_llvm_library(LLVMNVPTXInfo
11 NVPTXTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMNVPTXInfo NVPTXCommonTableGen)
0 add_llvm_library(LLVMPowerPCAsmParser
11 PPCAsmParser.cpp
22 )
3
4 add_dependencies(LLVMPowerPCAsmParser PowerPCCommonTableGen)
3333 PPCSelectionDAGInfo.cpp
3434 )
3535
36 add_dependencies(LLVMPowerPCCodeGen PowerPCCommonTableGen intrinsics_gen)
36 add_dependencies(LLVMPowerPCCodeGen intrinsics_gen)
3737
3838 add_subdirectory(AsmParser)
3939 add_subdirectory(InstPrinter)
0 add_llvm_library(LLVMPowerPCAsmPrinter
11 PPCInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMPowerPCAsmPrinter PowerPCCommonTableGen)
77 PPCMachObjectWriter.cpp
88 PPCELFObjectWriter.cpp
99 )
10
11 add_dependencies(LLVMPowerPCDesc PowerPCCommonTableGen)
0 add_llvm_library(LLVMPowerPCInfo
11 PowerPCTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMPowerPCInfo PowerPCCommonTableGen)
4949 SITypeRewriter.cpp
5050 )
5151
52 add_dependencies(LLVMR600CodeGen AMDGPUCommonTableGen intrinsics_gen)
52 add_dependencies(LLVMR600CodeGen intrinsics_gen)
5353
5454 add_subdirectory(InstPrinter)
5555 add_subdirectory(TargetInfo)
0 add_llvm_library(LLVMR600AsmPrinter
11 AMDGPUInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMR600AsmPrinter AMDGPUCommonTableGen)
77 R600MCCodeEmitter.cpp
88 SIMCCodeEmitter.cpp
99 )
10
11 add_dependencies(LLVMR600Desc AMDGPUCommonTableGen)
11 AMDGPUTargetInfo.cpp
22 )
33
4 add_dependencies(LLVMR600Info AMDGPUCommonTableGen intrinsics_gen)
4 add_dependencies(LLVMR600Info intrinsics_gen)
2424 SparcCodeEmitter.cpp
2525 )
2626
27 add_dependencies(LLVMSparcCodeGen SparcCommonTableGen intrinsics_gen)
27 add_dependencies(LLVMSparcCodeGen intrinsics_gen)
2828
2929 add_subdirectory(TargetInfo)
3030 add_subdirectory(MCTargetDesc)
11 SparcMCTargetDesc.cpp
22 SparcMCAsmInfo.cpp
33 )
4
5 add_dependencies(LLVMSparcDesc SparcCommonTableGen)
0 add_llvm_library(LLVMSparcInfo
11 SparcTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMSparcInfo SparcCommonTableGen)
0 add_llvm_library(LLVMSystemZAsmParser
11 SystemZAsmParser.cpp
22 )
3
4 add_dependencies(LLVMSystemZAsmParser SystemZCommonTableGen)
2929 SystemZTargetMachine.cpp
3030 )
3131
32 add_dependencies(LLVMSystemZCodeGen SystemZCommonTableGen intrinsics_gen)
33
3432 add_subdirectory(AsmParser)
3533 add_subdirectory(Disassembler)
3634 add_subdirectory(InstPrinter)
0 add_llvm_library(LLVMSystemZDisassembler
11 SystemZDisassembler.cpp
22 )
3
4 add_dependencies(LLVMSystemZDisassembler SystemZCommonTableGen)
0 add_llvm_library(LLVMSystemZAsmPrinter
11 SystemZInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMSystemZAsmPrinter SystemZCommonTableGen)
44 SystemZMCObjectWriter.cpp
55 SystemZMCTargetDesc.cpp
66 )
7
8 add_dependencies(LLVMSystemZDesc SystemZCommonTableGen)
0 add_llvm_library(LLVMSystemZInfo
11 SystemZTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMSystemZInfo SystemZCommonTableGen)
0 add_llvm_library(LLVMX86AsmParser
11 X86AsmParser.cpp
22 )
3
4 add_dependencies(LLVMX86AsmParser X86CommonTableGen)
5252
5353 add_llvm_target(X86CodeGen ${sources})
5454
55 add_dependencies(LLVMX86CodeGen X86CommonTableGen intrinsics_gen)
55 add_dependencies(LLVMX86CodeGen intrinsics_gen)
5656
5757 add_subdirectory(AsmParser)
5858 add_subdirectory(Disassembler)
99 PROPERTY COMPILE_FLAGS "/Od"
1010 )
1111 endif()
12
13 add_dependencies(LLVMX86Disassembler X86CommonTableGen)
22 X86IntelInstPrinter.cpp
33 X86InstComments.cpp
44 )
5
6 add_dependencies(LLVMX86AsmPrinter X86CommonTableGen)
88 X86MachORelocationInfo.cpp
99 X86ELFRelocationInfo.cpp
1010 )
11
12 add_dependencies(LLVMX86Desc X86CommonTableGen)
0 add_llvm_library(LLVMX86Info
11 X86TargetInfo.cpp
22 )
3
4 add_dependencies(LLVMX86Info X86CommonTableGen)
0 add_llvm_library(LLVMX86Utils
11 X86ShuffleDecode.cpp
22 )
3
4 add_dependencies(LLVMX86Utils X86CommonTableGen)
2525 XCoreSelectionDAGInfo.cpp
2626 )
2727
28 add_dependencies(LLVMXCoreCodeGen XCoreCommonTableGen intrinsics_gen)
28 add_dependencies(LLVMXCoreCodeGen intrinsics_gen)
2929
3030 add_subdirectory(Disassembler)
3131 add_subdirectory(InstPrinter)
0 add_llvm_library(LLVMXCoreDisassembler
11 XCoreDisassembler.cpp
22 )
3
4 add_dependencies(LLVMXCoreDisassembler XCoreCommonTableGen)
0 add_llvm_library(LLVMXCoreAsmPrinter
11 XCoreInstPrinter.cpp
22 )
3
4 add_dependencies(LLVMXCoreAsmPrinter XCoreCommonTableGen)
11 XCoreMCTargetDesc.cpp
22 XCoreMCAsmInfo.cpp
33 )
4
5 add_dependencies(LLVMXCoreDesc XCoreCommonTableGen)
0 add_llvm_library(LLVMXCoreInfo
11 XCoreTargetInfo.cpp
22 )
3
4 add_dependencies(LLVMXCoreInfo XCoreCommonTableGen)