1set(LSAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 2 3set(LSAN_LIT_TEST_MODE "Standalone") 4configure_lit_site_cfg( 5 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in 6 ${CMAKE_CURRENT_BINARY_DIR}/LsanConfig/lit.site.cfg) 7 8set(LSAN_LIT_TEST_MODE "AddressSanitizer") 9configure_lit_site_cfg( 10 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in 11 ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg) 12 13if(NOT APPLE AND NOT ANDROID) 14 set(LSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) 15 if(NOT COMPILER_RT_STANDALONE_BUILD) 16 list(APPEND LSAN_TEST_DEPS lsan asan) 17 endif() 18 add_lit_testsuite(check-lsan "Running the LeakSanitizer tests" 19 ${CMAKE_CURRENT_BINARY_DIR}/LsanConfig 20 ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig 21 DEPENDS ${LSAN_TEST_DEPS}) 22 set_target_properties(check-lsan PROPERTIES FOLDER "LSan tests") 23endif() 24