[llvm] Remove `br i1 undef` from CodeGen/X86 tests (#121733)
[llvm-project.git] / bolt / test / CMakeLists.txt
blob6e18b028bddfcdc89a2411dc1ef1a66839bd97fe
1 llvm_canonicalize_cmake_booleans(
2   BOLT_ENABLE_RUNTIME
3   )
5 configure_lit_site_cfg(
6   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
7   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
8   MAIN_CONFIG
9   ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
10   )
11 configure_lit_site_cfg(
12   ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
13   ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
14   MAIN_CONFIG
15   ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
16   )
18 set(BOLT_TEST_PARAMS
19   bolt_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
20   )
22 if (BOLT_CLANG_EXE AND NOT "clang" IN_LIST LLVM_ENABLE_PROJECTS)
23   add_executable(clang IMPORTED GLOBAL)
24   set_property(TARGET clang PROPERTY IMPORTED_LOCATION "${BOLT_CLANG_EXE}")
25 endif()
27 if (BOLT_LLD_EXE AND NOT "lld" IN_LIST LLVM_ENABLE_PROJECTS)
28   add_executable(lld IMPORTED GLOBAL)
29   set_property(TARGET lld PROPERTY IMPORTED_LOCATION "${BOLT_LLD_EXE}")
30 endif()
32 list(APPEND BOLT_TEST_DEPS
33   clang
34   count
35   FileCheck
36   llc
37   lld
38   llvm-config
39   llvm-bolt
40   llvm-bolt-binary-analysis
41   llvm-bolt-heatmap
42   llvm-bat-dump
43   llvm-dwarfdump
44   llvm-dwp
45   llvm-mc
46   llvm-nm
47   llvm-objdump
48   llvm-readelf
49   llvm-readobj
50   llvm-strings
51   llvm-strip
52   llvm-objcopy
53   merge-fdata
54   not
55   split-file
56   yaml2obj
57   )
59 add_custom_target(bolt-test-depends DEPENDS ${BOLT_TEST_DEPS})
60 set_target_properties(bolt-test-depends PROPERTIES FOLDER "BOLT/Tests")
62 add_lit_testsuite(check-bolt "Running the BOLT regression tests"
63   ${CMAKE_CURRENT_BINARY_DIR}
64   PARAMS ${BOLT_TEST_PARAMS}
65   DEPENDS ${BOLT_TEST_DEPS}
66   ARGS ${BOLT_TEST_EXTRA_ARGS}
67   )
69 add_lit_testsuites(BOLT ${CMAKE_CURRENT_SOURCE_DIR}
70   PARAMS ${BOLT_TEST_PARAMS}
71   DEPENDS ${BOLT_TEST_DEPS}