1set(SCUDO_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 2set(SCUDO_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) 3 4 5set(SCUDO_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) 6if(NOT COMPILER_RT_STANDALONE_BUILD) 7 list(APPEND SCUDO_TEST_DEPS scudo) 8endif() 9 10configure_lit_site_cfg( 11 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in 12 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg 13 ) 14 15if(CMAKE_SYSTEM_NAME MATCHES "Linux") 16 EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) 17 STRING(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE ${CPUINFO}) 18 STRING(COMPARE EQUAL "sse4_2" "${SSE_THERE}" SSE42_TRUE) 19endif(CMAKE_SYSTEM_NAME MATCHES "Linux") 20 21if (SSE42_TRUE AND CMAKE_SIZEOF_VOID_P EQUAL 8) 22 add_lit_testsuite(check-scudo 23 "Running the Scudo Hardened Allocator tests" 24 ${CMAKE_CURRENT_BINARY_DIR} 25 DEPENDS ${SCUDO_TEST_DEPS}) 26 set_target_properties(check-scudo PROPERTIES FOLDER 27 "Compiler-RT Misc") 28endif(SSE42_TRUE AND CMAKE_SIZEOF_VOID_P EQUAL 8) 29