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