blob: 72c1df7463d394da5643ec0e5de2f6b1db723aa4 [file] [log] [blame]
Chandler Carruth94d02512012-06-21 09:51:26 +00001set(LLVM_LINK_COMPONENTS
NAKAMURA Takumib5c4b8762013-12-10 11:13:32 +00002 AsmParser
3 BitReader
4 BitWriter
5 Core
6 ExecutionEngine
7 JIT
8 Support
Chandler Carruth94d02512012-06-21 09:51:26 +00009 nativecodegen
10 )
11
12# HACK: Declare a couple of source files as optionally compiled to satisfy the
13# missing-file-checker in LLVM's weird CMake build.
14set(LLVM_OPTIONAL_SOURCES
15 IntelJITEventListenerTest.cpp
16 OProfileJITEventListenerTest.cpp
17 )
18
19if( LLVM_USE_INTEL_JITEVENTS )
Chandler Carruth94d02512012-06-21 09:51:26 +000020 set(ProfileTestSources
21 IntelJITEventListenerTest.cpp
22 )
23 set(LLVM_LINK_COMPONENTS
24 ${LLVM_LINK_COMPONENTS}
Andrew Kaylor6d8776a2013-01-28 19:52:37 +000025 DebugInfo
Chandler Carruth94d02512012-06-21 09:51:26 +000026 IntelJITEvents
Andrew Kaylor6d8776a2013-01-28 19:52:37 +000027 Object
Chandler Carruth94d02512012-06-21 09:51:26 +000028 )
29endif( LLVM_USE_INTEL_JITEVENTS )
30
31if( LLVM_USE_OPROFILE )
32 set(ProfileTestSources
33 ${ProfileTestSources}
34 OProfileJITEventListenerTest.cpp
35 )
36 set(LLVM_LINK_COMPONENTS
37 ${LLVM_LINK_COMPONENTS}
38 OProfileJIT
39 )
40endif( LLVM_USE_OPROFILE )
41
42set(JITTestsSources
43 JITEventListenerTest.cpp
44 JITMemoryManagerTest.cpp
45 JITTest.cpp
46 MultiJITTest.cpp
47 ${ProfileTestSources}
48 )
49
50if(MSVC)
51 list(APPEND JITTestsSources JITTests.def)
52endif()
53
Nico Weber62588e12013-12-30 03:36:05 +000054# The JIT tests need to dlopen things.
55set(LLVM_NO_DEAD_STRIP 1)
56
NAKAMURA Takumi9573c482012-06-21 12:44:58 +000057add_llvm_unittest(JITTests
Chandler Carruth94d02512012-06-21 09:51:26 +000058 ${JITTestsSources}
59 )
60
Rafael Espindola5a2af522013-04-04 01:19:55 +000061if(MINGW OR CYGWIN)
62 set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
63endif()
Rafael Espindola76f92272013-04-04 01:01:32 +000064set_target_properties(JITTests PROPERTIES ENABLE_EXPORTS 1)