1configure_lit_site_cfg(
2  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
3  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
4  )
5
6set(CFI_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
7if(NOT COMPILER_RT_STANDALONE_BUILD)
8  list(APPEND CFI_TEST_DEPS
9    cfi
10    opt
11    ubsan
12  )
13  if(LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR)
14    list(APPEND CFI_TEST_DEPS
15      LLVMgold
16    )
17  endif()
18  if(APPLE)
19    list(APPEND CFI_TEST_DEPS
20      LTO
21    )
22  endif()
23  if(WIN32 AND COMPILER_RT_HAS_LLD_SOURCES)
24    list(APPEND CFI_TEST_DEPS
25      lld
26    )
27  endif()
28endif()
29
30add_lit_testsuite(check-cfi "Running the cfi regression tests"
31  ${CMAKE_CURRENT_BINARY_DIR}
32  DEPENDS ${CFI_TEST_DEPS})
33
34add_lit_target(check-cfi-and-supported "Running the cfi regression tests"
35  ${CMAKE_CURRENT_BINARY_DIR}
36  PARAMS check_supported=1
37  DEPENDS ${CFI_TEST_DEPS})
38
39set_target_properties(check-cfi PROPERTIES FOLDER "Tests")
40