Add to the list of cmake files the object file, not the asm file. This
[oota-llvm.git] / lib / Target / X86 / CMakeLists.txt
1 set(LLVM_TARGET_DEFINITIONS X86.td)
2
3 tablegen(X86GenRegisterInfo.h.inc -gen-register-desc-header)
4 tablegen(X86GenRegisterNames.inc -gen-register-enums)
5 tablegen(X86GenRegisterInfo.inc -gen-register-desc)
6 tablegen(X86GenDisassemblerTables.inc -gen-disassembler)
7 tablegen(X86GenInstrNames.inc -gen-instr-enums)
8 tablegen(X86GenInstrInfo.inc -gen-instr-desc)
9 tablegen(X86GenAsmWriter.inc -gen-asm-writer)
10 tablegen(X86GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
11 tablegen(X86GenAsmMatcher.inc -gen-asm-matcher)
12 tablegen(X86GenDAGISel.inc -gen-dag-isel)
13 tablegen(X86GenFastISel.inc -gen-fast-isel)
14 tablegen(X86GenCallingConv.inc -gen-callingconv)
15 tablegen(X86GenSubtarget.inc -gen-subtarget)
16 tablegen(X86GenEDInfo.inc -gen-enhanced-disassembly-info)
17
18 set(sources
19   SSEDomainFix.cpp
20   X86AsmBackend.cpp
21   X86AsmPrinter.cpp
22   X86COFFMachineModuleInfo.cpp
23   X86CodeEmitter.cpp
24   X86ELFWriterInfo.cpp
25   X86FastISel.cpp
26   X86FloatingPoint.cpp
27   X86FrameInfo.cpp
28   X86ISelDAGToDAG.cpp
29   X86ISelLowering.cpp
30   X86InstrInfo.cpp
31   X86JITInfo.cpp
32   X86MachObjectWriter.cpp
33   X86MCAsmInfo.cpp
34   X86MCCodeEmitter.cpp 
35   X86MCInstLower.cpp
36   X86RegisterInfo.cpp
37   X86SelectionDAGInfo.cpp
38   X86Subtarget.cpp
39   X86TargetMachine.cpp
40   X86TargetObjectFile.cpp
41   )
42
43 if( CMAKE_CL_64 )
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