cirrus [travis skip]
[awesomized/libmemcached] / CMakeConfig.txt
1
2 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
3 if(NOT DEFINED ENV{CMAKE_BUILD_TYPE})
4 set(ENV{CMAKE_BUILD_TYPE} Release)
5 endif()
6 set(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE}
7 CACHE STRING "build type (Release, Debug, ...)" FORCE)
8 endif()
9 set(CMAKE_INSTALL_PREFIX /usr/local
10 CACHE PATH "install prefix")
11
12 if(APPLE)
13 set(CMAKE_INSTALL_RPATH @loader_path
14 CACHE STRING "set relative rpath")
15 elseif(UNIX)
16 # FIXME
17 set(CMAKE_INSTALL_RPATH $ORIGIN
18 CACHE STRING "set relative rpath")
19 endif()
20
21 option(BUILD_TESTING "whether to enable build of the test suite"
22 $ENV{BUILD_TESTING})
23 option(BUILD_DOCSONLY "build *only* documentation"
24 $ENV{BUILD_DOCSONLY})
25 option(BUILD_DOCS "build documentation"
26 ${BUILD_DOCSONLY})
27 option(BUILD_DOCS_HTML "build HTML docs"
28 ${BUILD_DOCS})
29 option(BUILD_DOCS_MAN "build manpages"
30 ${BUILD_DOCS})
31 option(BUILD_DOCS_MANGZ "gzip manpages"
32 ${BUILD_DOCS_MAN})
33
34 option(ENABLE_DTRACE "enable dtrace support"
35 $ENV{ENABLE_DTRACE})
36 option(ENABLE_HASH_FNV64 "enable fnv64 hash support"
37 ON)
38 option(ENABLE_HASH_MURMUR "enable murmur hash support"
39 ON)
40 option(ENABLE_HASH_HSIEH "enable hsieh hash support"
41 $ENV{ENABLE_HASH_HSIEH})
42 option(ENABLE_MEMASLAP "enable memaslap client"
43 ON)
44 option(ENABLE_SASL "enable SASL support"
45 $ENV{ENABLE_SASL})
46
47 set(ENABLE_SANITIZERS "$ENV{ENABLE_SANITIZERS}"
48 CACHE STRING "sanitizers to enable (e.g. address undefined ...)")
49
50 if(BUILD_TESTING)
51 set(MEMCACHED_BINARY "$ENV{MEMCACHED_BINARY}"
52 CACHE STRING "memcached binary")
53 set(CMAKE_CTEST_ARGUMENTS "--output-on-failure")
54 if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
55 # available since CMake 3.17
56 list(APPEND CMAKE_CTEST_ARGUMENTS --repeat until-pass:2)
57 if(NOT "$ENV{CIRRUS_CI}")
58 list(APPEND CMAKE_CTEST_ARGUMENTS -j2)
59 endif()
60 endif()
61 endif()
62
63 if(BUILD_DOCS)
64 set(SPHINX_OPTIONS ""
65 CACHE STRING "additional sphinx-build command line options")
66 set(SPHINX_THEME "sphinx_rtd_theme"
67 CACHE STRING "sphinx HTML theme")
68 set(SPHINX_THEME_OPTIONS ""
69 CACHE STRING "sphinx HTML theme options")
70 set(SPHINX_EXTENSIONS ""
71 CACHE STRING "comma separated list of quoted sphinx extensions")
72 set(SPHINX_CONF_APPEND ""
73 CACHE STRING "append verbatim code to sphinx' conf.py")
74 endif()
75
76 # legacy
77
78 set(HAVE_VISIBILITY 1)
79 set(HAVE_SHARED_ENABLED 1)
80 set(HAVE_GCC_BUILTIN_ATOMIC 1)
81
82 # modules
83
84 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
85
86 if(NOT BUILD_DOCSONLY)
87 include(CMake/_Include.cmake)
88 endif()