X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=CMakeConfig.txt;h=7f611de5d7a3216b2b1738d1c4b95a9aa00d0d12;hb=cbaa9f46519f9b085e28db5f44247d23ca7ec5a4;hp=209f4770976161e7de1f380682c58d16b65d1fd6;hpb=49aa94b8c4df6c3fd9d5c9688651c6f928f9aad1;p=awesomized%2Flibmemcached diff --git a/CMakeConfig.txt b/CMakeConfig.txt index 209f4770..7f611de5 100644 --- a/CMakeConfig.txt +++ b/CMakeConfig.txt @@ -3,61 +3,63 @@ set(CMAKE_BUILD_TYPE Release set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "install prefix") -# make test +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() -set(BUILD_TESTING ON - CACHE STRING "whether to enable build of the test suite") +option(BUILD_TESTING "whether to enable build of the test suite" + OFF) +option(BUILD_DOCSONLY "build *only* documentation" + OFF) +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}) + +option(ENABLE_DTRACE "enable dtrace support" + OFF) +option(ENABLE_HASH_FNV64 "enable fnv64 hash support" + ON) +option(ENABLE_HASH_MURMUR "enable murmur hash support" + ON) +option(ENABLE_HASH_HSIEH "enable hsieh hash support" + OFF) +option(ENABLE_MEMASLAP "enable memaslap client" + ON) +option(ENABLE_SASL "enable SASL support" + OFF) set(ENABLE_SANITIZERS "" CACHE STRING "sanitizers to enable (e.g. address undefined ...)") -set(MEMCACHED_BINARY "/usr/bin/memcached" - CACHE FILEPATH "memcached binary") - -# sasl - -set(ENABLE_SASL OFF - CACHE BOOL "enable SASL support") - -# hashes - -set(ENABLE_FNV64_HASH ON - CACHE BOOL "enable fnv64 hash support") -set(ENABLE_MURMUR_HASH ON - CACHE BOOL "enable murmur hash support") -set(ENABLE_HSIEH_HASH OFF - CACHE BOOL "enable hsieh hash support") - -# memaslap, needs libevent and stdatomic -set(ENABLE_MEMASLAP ON - CACHE BOOL "enable memaslap client") - -# dtrace - -set(ENABLE_DTRACE OFF - CACHE BOOL "enable dtrace support") - -# docs / sphinx - -set(BUILD_DOCS ON - CACHE BOOL "build documentation") - -set(BUILD_DOCSONLY OFF - CACHE BOOL "build *only* documentation") - -set(GZIP_MAN ON - CACHE BOOL "gzip manpages") +if(BUILD_TESTING) + set(MEMCACHED_BINARY "/usr/bin/memcached" + CACHE FILEPATH "memcached binary") + set(CMAKE_CTEST_ARGUMENTS "--output-on-failure;-j2;--repeat;until-pass:2" + ) # available since CMake 3.17 +endif() -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 "'collapse_navigation':False, 'navigation_depth':2, 'titles_only':False, 'includehidden':False" - 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") +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() # legacy