| Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 1 | set(LLVM_LINK_COMPONENTS |
| Chandler Carruth | 33af93f | 2012-06-21 10:02:40 +0000 | [diff] [blame] | 2 | asmparser |
| 3 | bitreader |
| 4 | bitwriter |
| Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 5 | interpreter |
| Chandler Carruth | 33af93f | 2012-06-21 10:02:40 +0000 | [diff] [blame] | 6 | jit |
| Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 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 | |
| NAKAMURA Takumi | 9573c48 | 2012-06-21 12:44:58 +0000 | [diff] [blame^] | 52 | add_llvm_unittest(JITTests |
| Chandler Carruth | 94d0251 | 2012-06-21 09:51:26 +0000 | [diff] [blame] | 53 | ${JITTestsSources} |
| 54 | ) |
| 55 | |
| 56 | if(MINGW OR CYGWIN) |
| 57 | set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols) |
| 58 | endif() |