Silence -Wunused-variable in release builds.
[llvm/stm8.git] / lib / Target / CMakeLists.txt
blobf982316fc087d5d065a8954237f2b04eac4896b2
1 add_llvm_library(LLVMTarget
2   Mangler.cpp
3   Target.cpp
4   TargetAsmInfo.cpp
5   TargetAsmLexer.cpp
6   TargetData.cpp
7   TargetELFWriterInfo.cpp
8   TargetFrameLowering.cpp
9   TargetInstrInfo.cpp
10   TargetIntrinsicInfo.cpp
11   TargetLibraryInfo.cpp
12   TargetLoweringObjectFile.cpp
13   TargetMachine.cpp
14   TargetRegisterInfo.cpp
15   TargetSubtargetInfo.cpp
16   )
18 set(LLVM_ENUM_ASM_PRINTERS "")
19 set(LLVM_ENUM_ASM_PARSERS "")
20 set(LLVM_ENUM_DISASSEMBLERS "")
21 foreach(t ${LLVM_TARGETS_TO_BUILD})
22   message(STATUS "Targeting ${t}")
23   add_subdirectory(${t})
24   set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} )
25   file(GLOB asmp_file "${td}/*AsmPrinter.cpp")
26   if( asmp_file )
27     set(LLVM_ENUM_ASM_PRINTERS
28       "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n")
29   endif()
30   if( EXISTS ${td}/AsmParser/CMakeLists.txt )
31     set(LLVM_ENUM_ASM_PARSERS
32       "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
33   endif()
34   if( EXISTS ${td}/Disassembler/CMakeLists.txt )
35     set(LLVM_ENUM_DISASSEMBLERS
36       "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n")
37   endif()
38 endforeach(t)
40 # Produce llvm/Config/AsmPrinters.def
41 configure_file(
42   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in
43   ${LLVM_BINARY_DIR}/include/llvm/Config/AsmPrinters.def
44   )
46 # Produce llvm/Config/AsmParsers.def
47 configure_file(
48   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in
49   ${LLVM_BINARY_DIR}/include/llvm/Config/AsmParsers.def
50   )
52 # Produce llvm/Config/Disassemblers.def
53 configure_file(
54   ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in
55   ${LLVM_BINARY_DIR}/include/llvm/Config/Disassemblers.def
56   )