projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
cmake: missing file
[awesomized/libmemcached]
/
CMake
/
_Include.cmake
diff --git
a/CMake/_Include.cmake
b/CMake/_Include.cmake
index 9f6891c2a35145492ed15ccc3694813bfe801631..420a9723478b044c07db75093c8813519c77dd9c 100644
(file)
--- a/
CMake/_Include.cmake
+++ b/
CMake/_Include.cmake
@@
-1,10
+1,19
@@
-set(THREADS_PREFER_PTHREAD_FLAG ON)
# globals
# globals
-include(CTest)
+if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+ include(CTest)
+endif()
include(GNUInstallDirs)
include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
+ find_program(PKGCONF pkgconf)
+ if(PKGCONF)
+ set(PKG_CONFIG_EXECUTABLE ${PKGCONF})
+ endif()
+endif()
find_package(PkgConfig)
find_package(PkgConfig)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
# locals
find_package(Threads REQUIRED)
# locals
@@
-14,8
+23,11
@@
include(CheckDebug)
include(CheckDecl)
include(CheckDependency)
include(CheckHeader)
include(CheckDecl)
include(CheckDependency)
include(CheckHeader)
+include(CheckCompiles)
include(CheckType)
include(CheckStdatomic)
include(CheckType)
include(CheckStdatomic)
+include(TestBigEndian)
+include(CheckByteswap)
# configuration
# configuration
@@
-30,12
+42,22
@@
if(ENABLE_MEMASLAP)
endif()
## dtrace
endif()
## dtrace
+include(EnableDtrace)
if(ENABLE_DTRACE)
if(ENABLE_DTRACE)
- set(HAVE_DTRACE 1)
+ find_package(DTrace)
+ if(DTRACE_EXECUTABLE)
+ set(HAVE_DTRACE 1)
+ else()
+ message(WARNING "The dtrace command is required to enable dtrace/systemtap support.")
+ endif()
endif()
endif()
-##uuid
+##
uuid
if(BUILD_TESTING)
if(BUILD_TESTING)
+ if(NOT MEMCACHED_BINARY)
+ find_package(Memcached)
+ set(MEMCACHED_BINARY ${MEMCACHED_EXECUTABLE})
+ endif()
check_dependency(LIBUUID uuid uuid/uuid.h)
endif()
check_dependency(LIBUUID uuid uuid/uuid.h)
endif()
@@
-48,22
+70,25
@@
if(ENABLE_SASL)
endif()
## hashes
endif()
## hashes
-if(ENABLE_
FNV64_HASH
)
+if(ENABLE_
HASH_FNV64
)
set(HAVE_FNV64_HASH 1)
endif()
set(HAVE_FNV64_HASH 1)
endif()
-if(ENABLE_
MURMUR_HASH
)
+if(ENABLE_
HASH_MURMUR
)
set(HAVE_MURMUR_HASH 1)
endif()
set(HAVE_MURMUR_HASH 1)
endif()
-if(ENABLE_H
SIEH_HAS
H)
+if(ENABLE_H
ASH_HSIE
H)
set(HAVE_HSIEH_HASH 1)
endif()
# system checks
set(HAVE_HSIEH_HASH 1)
endif()
# system checks
+test_big_endian(WORDS_BIGENDIAN)
+check_byteswap()
+
+check_header(alloca.h)
check_header(arpa/inet.h)
check_header(dlfcn.h)
check_header(errno.h)
check_header(arpa/inet.h)
check_header(dlfcn.h)
check_header(errno.h)
-check_header(execinfo.h)
check_header(fcntl.h)
check_header(io.h)
check_header(limits.h)
check_header(fcntl.h)
check_header(io.h)
check_header(limits.h)
@@
-90,10
+115,18
@@
check_decl(MSG_MORE sys/socket.h)
check_decl(MSG_NOSIGNAL sys/socket.h)
check_decl(rcvtimeo sys/socket.h)
check_decl(sndtimeo sys/socket.h)
check_decl(MSG_NOSIGNAL sys/socket.h)
check_decl(rcvtimeo sys/socket.h)
check_decl(sndtimeo sys/socket.h)
-check_decl(s
trerror_r string
.h)
+check_decl(s
etenv stdlib
.h)
check_decl(strerror string.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)
check_decl(abi::__cxa_demangle cxxabi.h)
-set(HAVE_GCC_ABI_DEMANGLE ${HAVE_ABI____CXA_DEMANGLE})
+
+find_package(Backtrace)
+if(Backtrace_FOUND)
+ set(HAVE_BACKTRACE 1)
+endif()
check_type(in_port_t netinet/in.h)
check_type(in_port_t netinet/in.h)