1 set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) 2 if(NOT COMPILER_RT_STANDALONE_BUILD) 3 list(APPEND TSAN_TEST_DEPS tsan) 4 endif() 5 if(COMPILER_RT_HAS_LIBCXX_SOURCES AND 6 COMPILER_RT_TEST_COMPILER_ID STREQUAL "Clang") 7 list(APPEND TSAN_TEST_DEPS libcxx_tsan) 8 set(TSAN_HAS_LIBCXX True) 9 else() 10 set(TSAN_HAS_LIBCXX False) 11 endif() 12 13 configure_lit_site_cfg( 14 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in 15 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg) 16 17 if(COMPILER_RT_INCLUDE_TESTS) 18 configure_lit_site_cfg( 19 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in 20 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg) 21 list(APPEND TSAN_TEST_DEPS TsanUnitTests) 22 endif() 23 24 add_lit_testsuite(check-tsan "Running ThreadSanitizer tests" 25 ${CMAKE_CURRENT_BINARY_DIR} 26 DEPENDS ${TSAN_TEST_DEPS}) 27 set_target_properties(check-tsan PROPERTIES FOLDER "TSan tests") 28