1set(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. 14set(LLVM_OPTIONAL_SOURCES 15 IntelJITEventListenerTest.cpp 16 OProfileJITEventListenerTest.cpp 17 ) 18 19if( 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 ) 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 54# The JIT tests need to dlopen things. 55set(LLVM_NO_DEAD_STRIP 1) 56 57add_llvm_unittest(JITTests 58 ${JITTestsSources} 59 ) 60 61if(MINGW OR CYGWIN) 62 set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols) 63endif() 64set_target_properties(JITTests PROPERTIES ENABLE_EXPORTS 1) 65