-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeConfig.txt
101 lines (94 loc) · 3.51 KB
/
CMakeConfig.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
if(NOT DEFINED ENV{CMAKE_BUILD_TYPE})
set(ENV{CMAKE_BUILD_TYPE} Release)
endif()
set(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE}
CACHE STRING "build type (Release, Debug, ...)" FORCE)
endif()
set(CMAKE_INSTALL_PREFIX /usr/local
CACHE PATH "install prefix")
if(APPLE)
set(CMAKE_INSTALL_RPATH @loader_path
CACHE STRING "set relative rpath")
elseif(UNIX)
# FIXME
set(CMAKE_INSTALL_RPATH "\$ORIGIN"
CACHE STRING "set relative rpath")
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12")
set(TARGET_NAMELINK_COMPONENT "")
else()
set(TARGET_NAMELINK_COMPONENT NAMELINK_COMPONENT dev DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set(CLIENT_PREFIX mem
CACHE STRING "client prefix (default mem; i.e.: memstat, memcp, memcat ...)")
option(BUILD_SHARED_LIBS "whether to build shared libraries"
ON)
option(BUILD_TESTING "whether to enable build of the test suite"
$ENV{BUILD_TESTING})
option(BUILD_DOCSONLY "build *only* documentation"
$ENV{BUILD_DOCSONLY})
option(BUILD_DOCS "build documentation"
${BUILD_DOCSONLY})
option(BUILD_DOCS_HTML "build HTML docs"
${BUILD_DOCS})
option(BUILD_DOCS_MAN "build manpages"
${BUILD_DOCS})
option(BUILD_DOCS_MANGZ "gzip manpages"
${BUILD_DOCS_MAN})
if(BUILD_DOCS_MANGZ)
set(BUILD_DOCS_MAN ON CACHE BOOL "forced by BUILD_DOCS_MANGZ" FORCE)
endif()
if(BUILD_DOCS_MAN OR BUILD_DOCS_HTML)
set(BUILD_DOCS ON CACHE BOOL "forced by BUILD_DOCS_MAN OR BUILD_DOCS_HTML" FORCE)
endif()
set(ENABLE_SANITIZERS "$ENV{ENABLE_SANITIZERS}"
CACHE STRING "sanitizers to enable (e.g. address;undefined ...)")
option(ENABLE_SASL "enable SASL support"
$ENV{ENABLE_SASL})
option(ENABLE_DTRACE "enable dtrace support"
$ENV{ENABLE_DTRACE})
option(ENABLE_HASH_HSIEH "enable hsieh hash support"
$ENV{ENABLE_HASH_HSIEH})
if(NOT DEFINED ENV{ENABLE_HASH_FNV64})
set(ENV{ENABLE_HASH_FNV64} ON)
endif()
option(ENABLE_HASH_FNV64 "enable fnv64 hash support"
$ENV{ENABLE_HASH_FNV64})
if(NOT DEFINED ENV{ENABLE_HASH_MURMUR})
set(ENV{ENABLE_HASH_MURMUR} ON)
endif()
option(ENABLE_HASH_MURMUR "enable murmur hash support"
$ENV{ENABLE_HASH_MURMUR})
if(NOT DEFINED ENV{ENABLE_MEMASLAP})
set(ENV{ENABLE_MEMASLAP} ON)
endif()
option(ENABLE_MEMASLAP "enable memaslap client"
$ENV{ENABLE_MEMASLAP})
option(ENABLE_OPENSSL_CRYPTO
"enable OpenSSL's libcrypto instead of bundled AES implementation"
$ENV{ENABLE_OPENSSL_CRYPTO})
if(BUILD_TESTING)
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
list(APPEND CMAKE_CTEST_ARGUMENTS --repeat until-pass:2)
if(NOT "$ENV{CIRRUS_CI}")
list(APPEND CMAKE_CTEST_ARGUMENTS -j2)
endif()
endif()
endif()
if(BUILD_DOCS)
set(SPHINX_OPTIONS ""
CACHE STRING "additional sphinx-build command line options")
set(SPHINX_THEME "sphinx_rtd_theme"
CACHE STRING "sphinx HTML theme")
set(SPHINX_THEME_OPTIONS ""
CACHE STRING "sphinx HTML theme options")
set(SPHINX_EXTENSIONS ""
CACHE STRING "comma separated list of quoted sphinx extensions")
set(SPHINX_CONF_APPEND ""
CACHE STRING "append verbatim code to sphinx' conf.py")
endif()