X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=test%2FCMakeLists.txt;h=67cd47c69feef602275422af603ea0e8139f4d68;hb=92d18858b417309f6bdee6bce464a4f3d6a375fd;hp=6e64777a5a80083c29a720ed42e76b499ae20731;hpb=f875d401486e0e12d30b28e9d62220fdf6cd8561;p=awesomized%2Flibmemcached diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6e64777a..67cd47c6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -12,8 +12,6 @@ configure_define_string(LIBMEMCACHED_WITH_SASL_CONF) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake") include(Catch) -add_definitions(-D_GNU_SOURCE) -set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) check_symbol(pipe2 unistd.h) check_symbol(SOCK_NONBLOCK sys/socket.h) check_symbol(SOCK_CLOEXEC sys/socket.h) @@ -45,6 +43,9 @@ if(NOT MEMCACHED_BINARY) set(ENV{INVALID_CONFIGURATION} 1) endif() +add_executable(timeout timeout.c) +target_include_directories(timeout PRIVATE ${CMAKE_BINARY_DIR}) + file(GLOB_RECURSE TESTING_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) set(TESTING_ROOT "${CMAKE_CURRENT_BINARY_DIR}") set(SOURCES_ROOT "${CMAKE_SOURCE_DIR}") @@ -66,10 +67,10 @@ if(NOT (thread IN_LIST ENABLE_SANITIZERS)) endif() endif() -add_dependencies(runtests ${CLIENTS}) +add_dependencies(runtests ${CLIENTS} timeout) if(TARGET memaslap) configure_set(HAVE_MEMASLAP 1) - add_dependencies(runtests memaslap) + add_dependencies(runtests aslap) endif() configure_file(${CONFIGURE_FILE_IN} ${CONFIGURE_FILE_OUT} @ONLY)