1 set(LLVM_LINK_COMPONENTS 2 AsmParser 3 BitReader 4 BitWriter 5 Core 6 ExecutionEngine 7 JIT 8 Support 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 ) 20 set(ProfileTestSources 21 IntelJITEventListenerTest.cpp 22 ) 23 set(LLVM_LINK_COMPONENTS 24 ${LLVM_LINK_COMPONENTS} 25 DebugInfo 26 IntelJITEvents 27 Object 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 54 # The JIT tests need to dlopen things. 55 set(LLVM_NO_DEAD_STRIP 1) 56 57 add_llvm_unittest(JITTests 58 ${JITTestsSources} 59 ) 60 61 if(MINGW OR CYGWIN) 62 set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols) 63 endif() 64 set_target_properties(JITTests PROPERTIES ENABLE_EXPORTS 1) 65