Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 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 | if(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") |
| 23 | endif() |