2 ${LLVM_MAIN_SRC_DIR}/tools/llvm-exegesis/lib
5 set(LLVM_LINK_COMPONENTS
14 BenchmarkRunnerTest.cpp
20 set(exegesis_link_libraries LLVMExegesis)
22 function(add_llvm_exegesis_unittest_includes)
23 set(exegesis_includes ${exegesis_includes} ${ARGV} PARENT_SCOPE)
26 function(add_llvm_exegesis_unittest_sources)
28 list(TRANSFORM sources PREPEND "${CMAKE_CURRENT_LIST_DIR}/")
29 set(exegesis_sources ${exegesis_sources} ${sources} PARENT_SCOPE)
32 function(add_llvm_exegesis_unittest_link_components comps)
33 set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} ${ARGV} PARENT_SCOPE)
36 function(add_llvm_exegesis_unittest_link_libraries libs)
37 set(exegesis_link_libraries ${exegesis_link_libraries} ${ARGV} PARENT_SCOPE)
41 if(LLVM_TARGETS_TO_BUILD MATCHES "X86")
42 include(X86/CMakeLists.txt)
44 if(LLVM_TARGETS_TO_BUILD MATCHES "ARM")
45 include(ARM/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})
66 set_property(TARGET LLVMExegesisTests PROPERTY FOLDER "Tests/UnitTests/ToolTests")