-
+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
if(NOT DEFINED ENV{CMAKE_BUILD_TYPE})
set(ENV{CMAKE_BUILD_TYPE} Release)
CACHE STRING "sanitizers to enable (e.g. address undefined ...)")
if(BUILD_TESTING)
- find_program(MEMCACHED_BINARY memcached DOC "memcached binary")
+ set(MEMCACHED_BINARY $ENV{MEMCACHED_BINARY}
+ CACHE STRING "memcached binary")
set(CMAKE_CTEST_ARGUMENTS "--output-on-failure")
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
# available since CMake 3.17
include(CMake/Catch.cmake)
+if(NOT MEMCACHED_BINARY)
+ find_program(MEMCACHED_BINARY memcached DOC "memcached binary")
+ if(NOT MEMCACHED_BINARY)
+ message(SEND_ERROR "Could not find memcached(1) binary")
+ set(ENV{INVALID_CONFIGURATION} 1)
+ endif()
+endif()
+
+
check_decl(pipe2 unistd.h)
check_decl(SOCK_NONBLOCK sys/socket.h)
check_decl(SOCK_CLOEXEC sys/socket.h)