1 set(LLVM_LINK_COMPONENTS 2 asmparser 3 bitreader 4 bitwriter 5 jit 6 nativecodegen 7 ) 8 9 # HACK: Declare a couple of source files as optionally compiled to satisfy the 10 # missing-file-checker in LLVM's weird CMake build. 11 set(LLVM_OPTIONAL_SOURCES 12 IntelJITEventListenerTest.cpp 13 OProfileJITEventListenerTest.cpp 14 ) 15 16 if( LLVM_USE_INTEL_JITEVENTS ) 17 set(ProfileTestSources 18 IntelJITEventListenerTest.cpp 19 ) 20 set(LLVM_LINK_COMPONENTS 21 ${LLVM_LINK_COMPONENTS} 22 DebugInfo 23 IntelJITEvents 24 Object 25 ) 26 endif( LLVM_USE_INTEL_JITEVENTS ) 27 28 if( LLVM_USE_OPROFILE ) 29 set(ProfileTestSources 30 ${ProfileTestSources} 31 OProfileJITEventListenerTest.cpp 32 ) 33 set(LLVM_LINK_COMPONENTS 34 ${LLVM_LINK_COMPONENTS} 35 OProfileJIT 36 ) 37 endif( LLVM_USE_OPROFILE ) 38 39 set(JITTestsSources 40 JITEventListenerTest.cpp 41 JITMemoryManagerTest.cpp 42 JITTest.cpp 43 MultiJITTest.cpp 44 ${ProfileTestSources} 45 ) 46 47 if(MSVC) 48 list(APPEND JITTestsSources JITTests.def) 49 endif() 50 51 add_llvm_unittest(JITTests 52 ${JITTestsSources} 53 ) 54 55 if(MINGW OR CYGWIN) 56 set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols) 57 endif() 58 set_target_properties(JITTests PROPERTIES ENABLE_EXPORTS 1) 59