blob: 8cc2fbb271eb2f29aabc349b54f6ab312377f597 [file] [log] [blame]
Chandler Carruth94d02512012-06-21 09:51:26 +00001set(LLVM_LINK_COMPONENTS
Chandler Carruth33af93f2012-06-21 10:02:40 +00002 asmparser
3 bitreader
4 bitwriter
Chandler Carruth94d02512012-06-21 09:51:26 +00005 interpreter
Chandler Carruth33af93f2012-06-21 10:02:40 +00006 jit
Chandler Carruth94d02512012-06-21 09:51:26 +00007 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.
12set(LLVM_OPTIONAL_SOURCES
13 IntelJITEventListenerTest.cpp
14 OProfileJITEventListenerTest.cpp
15 )
16
17if( 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 )
27endif( LLVM_USE_INTEL_JITEVENTS )
28
29if( LLVM_USE_OPROFILE )
30 set(ProfileTestSources
31 ${ProfileTestSources}
32 OProfileJITEventListenerTest.cpp
33 )
34 set(LLVM_LINK_COMPONENTS
35 ${LLVM_LINK_COMPONENTS}
36 OProfileJIT
37 )
38endif( LLVM_USE_OPROFILE )
39
40set(JITTestsSources
41 JITEventListenerTest.cpp
42 JITMemoryManagerTest.cpp
43 JITTest.cpp
44 MultiJITTest.cpp
45 ${ProfileTestSources}
46 )
47
48if(MSVC)
49 list(APPEND JITTestsSources JITTests.def)
50endif()
51
NAKAMURA Takumi9573c482012-06-21 12:44:58 +000052add_llvm_unittest(JITTests
Chandler Carruth94d02512012-06-21 09:51:26 +000053 ${JITTestsSources}
54 )
55
56if(MINGW OR CYGWIN)
57 set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
58endif()