1 configure_lit_site_cfg( 2 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in 3 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg 4 ) 5 6 if(COMPILER_RT_CAN_EXECUTE_TESTS) 7 # Run UBSan output tests only if we're sure that clang would produce 8 # working binaries. 9 set(UBSAN_TEST_DEPS 10 ${SANITIZER_COMMON_LIT_TEST_DEPS} 11 ${UBSAN_RUNTIME_LIBRARIES}) 12 set(UBSAN_TEST_PARAMS 13 ubsan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg 14 ) 15 add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests" 16 ${CMAKE_CURRENT_BINARY_DIR} 17 PARAMS ${UBSAN_TEST_PARAMS} 18 DEPENDS ${UBSAN_TEST_DEPS} 19 ) 20 set_target_properties(check-ubsan PROPERTIES FOLDER "UBSan unittests") 21 endif() 22