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