Merge branch 'catch' of github.com:m6w6/libmemcached into gh-actions
[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 "/usr/bin/memcached"
52 CACHE FILEPATH "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 -j2 --repeat until-pass:2)
57 endif()
58 endif()
59
60 if(BUILD_DOCS)
61 set(SPHINX_OPTIONS ""
62 CACHE STRING "additional sphinx-build command line options")
63 set(SPHINX_THEME "sphinx_rtd_theme"
64 CACHE STRING "sphinx HTML theme")
65 set(SPHINX_THEME_OPTIONS ""
66 CACHE STRING "sphinx HTML theme options")
67 set(SPHINX_EXTENSIONS ""
68 CACHE STRING "comma separated list of quoted sphinx extensions")
69 set(SPHINX_CONF_APPEND ""
70 CACHE STRING "append verbatim code to sphinx' conf.py")
71 endif()
72
73 # legacy
74
75 set(HAVE_VISIBILITY 1)
76 set(HAVE_SHARED_ENABLED 1)
77 set(HAVE_GCC_BUILTIN_ATOMIC 1)
78
79 # modules
80
81 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
82
83 if(NOT BUILD_DOCSONLY)
84 include(CMake/_Include.cmake)
85 endif()