1 cmake_minimum_required(VERSION 3.9..3.16)
3 if(${CMAKE_VERSION} VERSION_LESS 3.12)
4 cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
9 DESCRIPTION "libmemcached https://github.com/m6w6/libmemcached"
12 set(CMAKE_CXX_STANDARD 11)
13 set(CMAKE_CXX_STANDARD_REQUIRED ON)
14 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
17 include(Include.cmake)
19 find_package(Threads REQUIRED)
20 find_library(HAVE_LIBSASL NAMES sasl sasl2)
21 check_header(sasl/sasl.h)
23 check_header(arpa/inet.h)
26 check_header(execinfo.h)
29 check_header(limits.h)
32 check_header(stddef.h)
33 check_header(stdlib.h)
34 check_header(strings.h)
35 check_header(sys/socket.h)
36 check_header(sys/time.h)
37 check_header(sys/types.h)
38 check_header(sys/un.h)
41 check_header(unistd.h)
42 check_header(winsock2.h)
43 check_header(ws2tcpip.h)
45 check_decl(fcntl fcntl.h)
46 check_decl(htonll arpa/inet.h)
47 check_decl(MSG_DONTWAIT sys/socket.h)
48 check_decl(MSG_MORE sys/socket.h)
49 check_decl(MSG_NOSIGNAL sys/socket.h)
50 check_decl(rcvtimeo sys/socket.h)
51 check_decl(sndtimeo sys/socket.h)
52 check_decl(strerror_r string.h)
53 check_decl(strerror string.h)
54 check_decl(abi::__cxa_demangle cxxabi.h)
55 set(HAVE_GCC_ABI_DEMANGLE ${HAVE_ABI____CXA_DEMANGLE})
57 check_type(in_port_t netinet/in.h)
60 check_header(cinttypes)
64 configure_file(mem_config.h.in ${CMAKE_BINARY_DIR}/mem_config.h @ONLY)
66 include_directories(${CMAKE_BINARY_DIR})
68 add_subdirectory(clients)
69 add_subdirectory(libhashkit)
70 add_subdirectory(libhashkit-1.0)
71 add_subdirectory(libmemcached)
72 add_subdirectory(libmemcached-1.0)
73 add_subdirectory(libmemcachedinternal)
74 add_subdirectory(libmemcachedutil)
93 include_directories(${CMAKE_BINARY_DIR})
94 include_directories(.)
95 include_directories(clients)
96 include_directories(example)
97 include_directories(libhashkit)
98 include_directories(libhashkit-1.0)
99 include_directories(libmemcached)
100 include_directories(libmemcached/csl)
101 include_directories(libmemcached/memcached)
102 include_directories(libmemcached-1.0)
103 include_directories(libmemcached-1.0/struct)
104 include_directories(libmemcached-1.0/types)
105 include_directories(libmemcachedprotocol)
106 include_directories(libmemcachedprotocol-0.0)
107 include_directories(libmemcachedutil)
108 include_directories(libmemcachedutil-1.0)
109 include_directories(libtest)
110 include_directories(libtest/exception)
111 include_directories(libtest/result)
112 include_directories(tests)
113 include_directories(tests/libmemcached-1.0)
114 include_directories(util)
115 include_directories(win32)
122 example/interface_v0.cc
123 example/interface_v1.cc
124 example/memcached_light.cc
125 example/memcached_light.h
130 libmemcached-1.0/t/c_sasl_test.c
131 libmemcached-1.0/t/c_test.c
132 libmemcached-1.0/t/cc_test.cc
134 libmemcachedprotocol/ascii_handler.c
135 libmemcachedprotocol/ascii_handler.h
136 libmemcachedprotocol/binary_handler.c
137 libmemcachedprotocol/binary_handler.h
138 libmemcachedprotocol/cache.c
139 libmemcachedprotocol/cache.h
140 libmemcachedprotocol/common.h
141 libmemcachedprotocol/handler.c
142 libmemcachedprotocol/pedantic.c
143 libmemcachedprotocol-0.0/binary.h
144 libmemcachedprotocol-0.0/callback.h
145 libmemcachedprotocol-0.0/handler.h
146 libmemcachedprotocol-0.0/vbucket.h
148 libmemcachedutil/common.h
150 libmemcachedutil-1.0/flush.h
151 libmemcachedutil-1.0/ostream.hpp
152 libmemcachedutil-1.0/pid.h
153 libmemcachedutil-1.0/ping.h
154 libmemcachedutil-1.0/pool.h
155 libmemcachedutil-1.0/util.h
156 libmemcachedutil-1.0/version.h
158 libtest/exception/disconnected.hpp
159 libtest/exception/fatal.cc
160 libtest/exception/fatal.hpp
161 libtest/result/base.hpp
162 libtest/result/fail.hpp
163 libtest/result/skip.hpp
164 libtest/result/success.hpp
168 libtest/backtrace_test.cc
171 libtest/blobslap_worker.cc
172 libtest/blobslap_worker.h
178 libtest/collection.cc
181 libtest/comparison.cc
182 libtest/comparison.hpp
185 libtest/core_count.cc
196 libtest/exception.hpp
199 libtest/formatter.hpp
220 libtest/memcached.hpp
221 libtest/poll_error.hpp
230 libtest/server_container.cc
231 libtest/server_container.h
259 tests/libmemcached-1.0/all_tests.cc
260 tests/libmemcached-1.0/all_tests.h
261 tests/libmemcached-1.0/all_tests_socket.cc
262 tests/libmemcached-1.0/atomsmasher.cc
263 tests/libmemcached-1.0/basic.cc
264 tests/libmemcached-1.0/callback_counter.cc
265 tests/libmemcached-1.0/callback_counter.h
266 tests/libmemcached-1.0/callbacks.cc
267 tests/libmemcached-1.0/debug.cc
268 tests/libmemcached-1.0/deprecated.cc
269 tests/libmemcached-1.0/dump.cc
270 tests/libmemcached-1.0/dump.h
271 tests/libmemcached-1.0/encoding_key.cc
272 tests/libmemcached-1.0/encoding_key.h
273 tests/libmemcached-1.0/error_conditions.cc
274 tests/libmemcached-1.0/exist.cc
275 tests/libmemcached-1.0/fetch_all_results.cc
276 tests/libmemcached-1.0/fetch_all_results.h
277 tests/libmemcached-1.0/generate.cc
278 tests/libmemcached-1.0/generate.h
279 tests/libmemcached-1.0/haldenbrand.cc
280 tests/libmemcached-1.0/haldenbrand.h
281 tests/libmemcached-1.0/internals.cc
282 tests/libmemcached-1.0/ketama.cc
283 tests/libmemcached-1.0/mem_functions.cc
284 tests/libmemcached-1.0/mem_functions.h
285 tests/libmemcached-1.0/memcached_fetch_execute.cc
286 tests/libmemcached-1.0/memcached_fetch_execute.h
287 tests/libmemcached-1.0/memcached_get.cc
288 tests/libmemcached-1.0/memcached_get.h
289 tests/libmemcached-1.0/namespace.cc
290 tests/libmemcached-1.0/parser.cc
291 tests/libmemcached-1.0/parser.h
292 tests/libmemcached-1.0/plus.cpp
293 tests/libmemcached-1.0/pool.cc
294 tests/libmemcached-1.0/print.cc
295 tests/libmemcached-1.0/replication.cc
296 tests/libmemcached-1.0/sasl.cc
297 tests/libmemcached-1.0/server_add.cc
298 tests/libmemcached-1.0/setup_and_teardowns.cc
299 tests/libmemcached-1.0/setup_and_teardowns.h
300 tests/libmemcached-1.0/stat.cc
301 tests/libmemcached-1.0/stat.h
302 tests/libmemcached-1.0/string.cc
303 tests/libmemcached-1.0/touch.cc
304 tests/libmemcached-1.0/virtual_buckets.cc
311 tests/error_conditions.h
316 tests/hashkit_functions.cc
318 tests/ketama_test_cases.h
319 tests/ketama_test_cases_spy.h
321 tests/libmemcached_test_container.h
322 tests/libmemcached_world.h
323 tests/libmemcached_world_socket.h
347 tests/virtual_buckets.h