Move TargetRegistry and TargetSelect from Target to Support where they belong.
[oota-llvm.git] / lib / Target / X86 / CMakeLists.txt
1 set(LLVM_TARGET_DEFINITIONS X86.td)
2
3 tablegen(X86GenRegisterInfo.inc -gen-register-info)
4 tablegen(X86GenDisassemblerTables.inc -gen-disassembler)
5 tablegen(X86GenInstrInfo.inc -gen-instr-info)
6 tablegen(X86GenAsmWriter.inc -gen-asm-writer)
7 tablegen(X86GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
8 tablegen(X86GenAsmMatcher.inc -gen-asm-matcher)
9 tablegen(X86GenDAGISel.inc -gen-dag-isel)
10 tablegen(X86GenFastISel.inc -gen-fast-isel)
11 tablegen(X86GenCallingConv.inc -gen-callingconv)
12 tablegen(X86GenSubtargetInfo.inc -gen-subtarget)
13 tablegen(X86GenEDInfo.inc -gen-enhanced-disassembly-info)
14 add_public_tablegen_target(X86CommonTableGen)
15
16 set(sources
17   SSEDomainFix.cpp
18   X86AsmPrinter.cpp
19   X86COFFMachineModuleInfo.cpp
20   X86CodeEmitter.cpp
21   X86ELFWriterInfo.cpp
22   X86FastISel.cpp
23   X86FloatingPoint.cpp
24   X86FrameLowering.cpp
25   X86ISelDAGToDAG.cpp
26   X86ISelLowering.cpp
27   X86InstrInfo.cpp
28   X86JITInfo.cpp
29   X86MCInstLower.cpp
30   X86RegisterInfo.cpp
31   X86SelectionDAGInfo.cpp
32   X86Subtarget.cpp
33   X86TargetMachine.cpp
34   X86TargetObjectFile.cpp
35   X86VZeroUpper.cpp
36   )
37
38 if( CMAKE_CL_64 )
39   # A workaround for a bug in cmake 2.8.3. See PR 8885.
40   if( CMAKE_VERSION STREQUAL "2.8.3" )
41     include(CMakeDetermineCompilerId)
42   endif()
43   # end of workaround.
44   enable_language(ASM_MASM)
45   ADD_CUSTOM_COMMAND(
46     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj
47     MAIN_DEPENDENCY X86CompilationCallback_Win64.asm
48     COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/X86CompilationCallback_Win64.asm
49    )
50    set(sources ${sources} ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj)
51 endif()
52
53 add_llvm_target(X86CodeGen ${sources})
54
55 add_llvm_library_dependencies(LLVMX86CodeGen
56   LLVMAnalysis
57   LLVMAsmPrinter
58   LLVMCodeGen
59   LLVMCore
60   LLVMMC
61   LLVMSelectionDAG
62   LLVMSupport
63   LLVMTarget
64   LLVMX86AsmPrinter
65   LLVMX86Desc
66   )
67
68 add_subdirectory(AsmParser)
69 add_subdirectory(Disassembler)
70 add_subdirectory(InstPrinter)
71 add_subdirectory(MCTargetDesc)
72 add_subdirectory(TargetInfo)
73 add_subdirectory(Utils)