[libc++] Add a benchmark for std::num_get
[llvm-project.git] / llvm / unittests / tools / llvm-mca / CMakeLists.txt
blob9c69509b4b54d4e8e22fa14068a723e7b13f6c4b
1 set(LLVM_LINK_COMPONENTS
2   MC
3   MCA
4   Support
5   TargetParser
6   )
8 set(mca_root ${LLVM_MAIN_SRC_DIR}/tools/llvm-mca)
10 set(mca_includes
11   ${CMAKE_CURRENT_SOURCE_DIR}
12   ${mca_root}
13   )
15 # Right now we only need SummaryView.
16 set(mca_views_sources
17   SummaryView.cpp
18   )
19 list(TRANSFORM mca_views_sources PREPEND "${mca_root}/Views/")
21 set(mca_sources
22   MCATestBase.cpp
23   ${mca_views_sources}
24   )
26 function(add_llvm_mca_unittest_includes)
27   set(mca_includes ${mca_includes} ${ARGV} PARENT_SCOPE)
28 endfunction()
30 function(add_llvm_mca_unittest_sources)
31   set(sources ${ARGV})
32   list(TRANSFORM sources PREPEND "${CMAKE_CURRENT_LIST_DIR}/")
33   set(mca_sources ${mca_sources} ${sources} PARENT_SCOPE)
34 endfunction()
36 function(add_llvm_mca_unittest_link_components comps)
37   set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} ${ARGV} PARENT_SCOPE)
38 endfunction()
40 if(LLVM_TARGETS_TO_BUILD MATCHES "X86")
41   include(X86/CMakeLists.txt)
42 endif()
44 list(REMOVE_DUPLICATES LLVM_LINK_COMPONENTS)
46 include_directories(${mca_includes})
48 add_llvm_target_unittest(LLVMMCATests
49   ${mca_sources}
50   )