Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 1 | set(LLVM_LINK_COMPONENTS |
NAKAMURA Takumi | b5c4b876 | 2013-12-10 11:13:32 +0000 | [diff] [blame] | 2 | AsmParser |
| 3 | BitReader |
| 4 | BitWriter |
| 5 | Core |
| 6 | ExecutionEngine |
| 7 | JIT |
| 8 | Support |
Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 9 | 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. |
| 14 | set(LLVM_OPTIONAL_SOURCES |
| 15 | IntelJITEventListenerTest.cpp |
| 16 | OProfileJITEventListenerTest.cpp |
| 17 | ) |
| 18 | |
| 19 | if( LLVM_USE_INTEL_JITEVENTS ) |
Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 20 | set(ProfileTestSources |
| 21 | IntelJITEventListenerTest.cpp |
| 22 | ) |
| 23 | set(LLVM_LINK_COMPONENTS |
| 24 | ${LLVM_LINK_COMPONENTS} |
Andrew Kaylor | 6d8776a | 2013-01-28 19:52:37 +0000 | [diff] [blame] | 25 | DebugInfo |
Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 26 | IntelJITEvents |
Andrew Kaylor | 6d8776a | 2013-01-28 19:52:37 +0000 | [diff] [blame] | 27 | Object |
Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 28 | ) |
| 29 | endif( LLVM_USE_INTEL_JITEVENTS ) |
| 30 | |
| 31 | if( LLVM_USE_OPROFILE ) |
| 32 | set(ProfileTestSources |
| 33 | ${ProfileTestSources} |
| 34 | OProfileJITEventListenerTest.cpp |
| 35 | ) |
| 36 | set(LLVM_LINK_COMPONENTS |
| 37 | ${LLVM_LINK_COMPONENTS} |
| 38 | OProfileJIT |
| 39 | ) |
| 40 | endif( LLVM_USE_OPROFILE ) |
| 41 | |
| 42 | set(JITTestsSources |
| 43 | JITEventListenerTest.cpp |
| 44 | JITMemoryManagerTest.cpp |
| 45 | JITTest.cpp |
| 46 | MultiJITTest.cpp |
| 47 | ${ProfileTestSources} |
| 48 | ) |
| 49 | |
| 50 | if(MSVC) |
| 51 | list(APPEND JITTestsSources JITTests.def) |
| 52 | endif() |
| 53 | |
Nico Weber | 62588e1 | 2013-12-30 03:36:05 +0000 | [diff] [blame] | 54 | # The JIT tests need to dlopen things. |
| 55 | set(LLVM_NO_DEAD_STRIP 1) |
| 56 | |
NAKAMURA Takumi | 9573c48 | 2012-06-21 12:44:58 +0000 | [diff] [blame] | 57 | add_llvm_unittest(JITTests |
Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 58 | ${JITTestsSources} |
| 59 | ) |
| 60 | |
Rafael Espindola | 5a2af52 | 2013-04-04 01:19:55 +0000 | [diff] [blame] | 61 | if(MINGW OR CYGWIN) |
| 62 | set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols) |
| 63 | endif() |
Rafael Espindola | 76f9227 | 2013-04-04 01:01:32 +0000 | [diff] [blame] | 64 | set_target_properties(JITTests PROPERTIES ENABLE_EXPORTS 1) |