2 ${LLVM_MAIN_SRC_DIR}/tools/llvm-exegesis/lib
5 set(LLVM_LINK_COMPONENTS
16 BenchmarkRunnerTest.cpp
20 ResultAggregatorTest.cpp
23 set(exegesis_link_libraries LLVMExegesis)
25 function(add_llvm_exegesis_unittest_includes)
26 set(exegesis_includes ${exegesis_includes} ${ARGV} PARENT_SCOPE)
29 function(add_llvm_exegesis_unittest_sources)
31 list(TRANSFORM sources PREPEND "${CMAKE_CURRENT_LIST_DIR}/")
32 set(exegesis_sources ${exegesis_sources} ${sources} PARENT_SCOPE)
35 function(add_llvm_exegesis_unittest_link_components comps)
36 set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} ${ARGV} PARENT_SCOPE)
39 function(add_llvm_exegesis_unittest_link_libraries libs)
40 set(exegesis_link_libraries ${exegesis_link_libraries} ${ARGV} PARENT_SCOPE)
44 if(LLVM_TARGETS_TO_BUILD MATCHES "X86")
45 include(X86/CMakeLists.txt)
47 if(LLVM_TARGETS_TO_BUILD MATCHES "AArch64")
48 include(AArch64/CMakeLists.txt)
50 if(LLVM_TARGETS_TO_BUILD MATCHES "PowerPC")
51 include(PowerPC/CMakeLists.txt)
53 if(LLVM_TARGETS_TO_BUILD MATCHES "Mips")
54 include(Mips/CMakeLists.txt)
57 include_directories(${exegesis_includes})
59 list(REMOVE_DUPLICATES LLVM_LINK_COMPONENTS)
61 add_llvm_target_unittest(LLVMExegesisTests
64 target_link_libraries(LLVMExegesisTests PRIVATE ${exegesis_link_libraries})