testing
[awesomized/libmemcached] / CMake / _Include.cmake
index 7067ef46fc4cea2ab5a5b6ed57c0316aba713fd3..420a9723478b044c07db75093c8813519c77dd9c 100644 (file)
@@ -26,6 +26,8 @@ include(CheckHeader)
 include(CheckCompiles)
 include(CheckType)
 include(CheckStdatomic)
+include(TestBigEndian)
+include(CheckByteswap)
 
 # configuration
 
@@ -52,6 +54,10 @@ endif()
 
 ## uuid
 if(BUILD_TESTING)
+    if(NOT MEMCACHED_BINARY)
+        find_package(Memcached)
+        set(MEMCACHED_BINARY ${MEMCACHED_EXECUTABLE})
+    endif()
     check_dependency(LIBUUID uuid uuid/uuid.h)
 endif()
 
@@ -76,8 +82,8 @@ endif()
 
 # system checks
 
-include(TestBigEndian)
 test_big_endian(WORDS_BIGENDIAN)
+check_byteswap()
 
 check_header(alloca.h)
 check_header(arpa/inet.h)
@@ -112,6 +118,7 @@ check_decl(sndtimeo sys/socket.h)
 check_decl(setenv stdlib.h)
 check_decl(strerror string.h)
 check_decl(strerror_r string.h)
+
 check_compiles(HAVE_STRERROR_R_CHAR_P "char x, y = *strerror_r(0,&x,1);" string.h)
 
 check_decl(abi::__cxa_demangle cxxabi.h)