Temporarily Revert "Nuke the old JIT." as it's not quite ready to
[oota-llvm.git] / unittests / ExecutionEngine / JIT / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS
2   AsmParser
3   BitReader
4   BitWriter
5   Core
6   ExecutionEngine
7   JIT
8   MC
9   Support
10   nativecodegen
11   )
12
13 # HACK: Declare a couple of source files as optionally compiled to satisfy the
14 # missing-file-checker in LLVM's weird CMake build.
15 set(LLVM_OPTIONAL_SOURCES
16   IntelJITEventListenerTest.cpp
17   OProfileJITEventListenerTest.cpp
18   )
19
20 if( LLVM_USE_INTEL_JITEVENTS )
21   set(ProfileTestSources
22     IntelJITEventListenerTest.cpp
23     )
24   set(LLVM_LINK_COMPONENTS
25     ${LLVM_LINK_COMPONENTS}
26     DebugInfo
27     IntelJITEvents
28     Object
29     ) 
30 endif( LLVM_USE_INTEL_JITEVENTS )
31
32 if( LLVM_USE_OPROFILE )
33   set(ProfileTestSources
34     ${ProfileTestSources}
35     OProfileJITEventListenerTest.cpp
36     )
37   set(LLVM_LINK_COMPONENTS
38     ${LLVM_LINK_COMPONENTS}
39     OProfileJIT
40     )
41 endif( LLVM_USE_OPROFILE )
42
43 set(JITTestsSources
44   JITEventListenerTest.cpp
45   JITMemoryManagerTest.cpp
46   JITTest.cpp
47   MultiJITTest.cpp
48   ${ProfileTestSources}
49   )
50
51 if(MSVC)
52   list(APPEND JITTestsSources JITTests.def)
53 endif()
54
55 # The JIT tests need to dlopen things.
56 set(LLVM_NO_DEAD_STRIP 1)
57
58 add_llvm_unittest(JITTests
59   ${JITTestsSources}
60   )
61
62 if(MINGW OR CYGWIN)
63   set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
64 endif()
65 set_target_properties(JITTests PROPERTIES ENABLE_EXPORTS 1)