1set(SAFESTACK_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 2set(SAFESTACK_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) 3 4set(SAFESTACK_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) 5if(NOT COMPILER_RT_STANDALONE_BUILD) 6 list(APPEND SAFESTACK_TEST_DEPS safestack) 7 8 # Some tests require LTO, so add a dependency on the relevant LTO plugin. 9 if(LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR) 10 list(APPEND SAFESTACK_TEST_DEPS 11 LLVMgold 12 ) 13 endif() 14 if(APPLE) 15 list(APPEND SAFESTACK_TEST_DEPS 16 LTO 17 ) 18 endif() 19endif() 20 21configure_lit_site_cfg( 22 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in 23 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg 24 ) 25 26add_lit_testsuite(check-safestack "Running the SafeStack tests" 27 ${CMAKE_CURRENT_BINARY_DIR} 28 DEPENDS ${SAFESTACK_TEST_DEPS}) 29set_target_properties(check-safestack PROPERTIES FOLDER "SafeStack tests") 30