Add some missing dependencies here that I missed in my first pass
[oota-llvm.git] / unittests / ExecutionEngine / JIT / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS
2   asmparser
3   bitreader
4   bitwriter
5   interpreter
6   jit
7   nativecodegen
8   )
9
10 # HACK: Declare a couple of source files as optionally compiled to satisfy the
11 # missing-file-checker in LLVM's weird CMake build.
12 set(LLVM_OPTIONAL_SOURCES
13   IntelJITEventListenerTest.cpp
14   OProfileJITEventListenerTest.cpp
15   )
16
17 if( LLVM_USE_INTEL_JITEVENTS )
18   include_directories( ${LLVM_INTEL_JITEVENTS_INCDIR} )
19   link_directories( ${LLVM_INTEL_JITEVENTS_LIBDIR} )
20   set(ProfileTestSources
21     IntelJITEventListenerTest.cpp
22     )
23   set(LLVM_LINK_COMPONENTS
24     ${LLVM_LINK_COMPONENTS}
25     IntelJITEvents
26     ) 
27 endif( LLVM_USE_INTEL_JITEVENTS )
28
29 if( LLVM_USE_OPROFILE )
30   set(ProfileTestSources
31     ${ProfileTestSources}
32     OProfileJITEventListenerTest.cpp
33     )
34   set(LLVM_LINK_COMPONENTS
35     ${LLVM_LINK_COMPONENTS}
36     OProfileJIT
37     )
38 endif( LLVM_USE_OPROFILE )
39
40 set(JITTestsSources
41   JITEventListenerTest.cpp
42   JITMemoryManagerTest.cpp
43   JITTest.cpp
44   MultiJITTest.cpp
45   ${ProfileTestSources}
46   )
47
48 if(MSVC)
49   list(APPEND JITTestsSources JITTests.def)
50 endif()
51
52 add_llvm_unittest(ExecutionEngine/JITTests
53   ${JITTestsSources}
54   )
55
56 if(MINGW OR CYGWIN)
57   set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
58 endif()