cpack: NSIS
[m6w6/libmemcached] / CMakeConfig.txt
index 7e36cf5ac5d1574cf0b34d78fa14318b928a8b38..377c03ad8314e9c924b50e5d95c4fd14c980ce0d 100644 (file)
@@ -1,4 +1,3 @@
-
 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
     if(NOT DEFINED ENV{CMAKE_BUILD_TYPE})
         set(ENV{CMAKE_BUILD_TYPE} Release)
@@ -14,7 +13,7 @@ if(APPLE)
         CACHE STRING "set relative rpath")
 elseif(UNIX)
     # FIXME
-    set(CMAKE_INSTALL_RPATH $ORIGIN
+    set(CMAKE_INSTALL_RPATH "\$ORIGIN"
         CACHE STRING "set relative rpath")
 endif()
 
@@ -31,29 +30,40 @@ option(BUILD_DOCS_MAN       "build manpages"
 option(BUILD_DOCS_MANGZ     "gzip manpages"
         ${BUILD_DOCS_MAN})
 
+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_FNV64    "enable fnv64 hash support"
-        ON)
-option(ENABLE_HASH_MURMUR   "enable murmur hash support"
-        ON)
 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"
-        ON)
-option(ENABLE_SASL          "enable SASL support"
-        $ENV{ENABLE_SASL})
-
-set(ENABLE_SANITIZERS $ENV{ENABLE_SANITIZERS}
-    CACHE STRING "sanitizers to enable (e.g. address undefined ...)")
+       $ENV{ENABLE_MEMASLAP})
 
 if(BUILD_TESTING)
-    set(MEMCACHED_BINARY $ENV{MEMCACHED_BINARY}
+    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 -j2 --repeat until-pass:2)
+        list(APPEND CMAKE_CTEST_ARGUMENTS --repeat until-pass:2)
+        if(NOT "$ENV{CIRRUS_CI}")
+            list(APPEND CMAKE_CTEST_ARGUMENTS -j2)
+        endif()
     endif()
 endif()
 
@@ -70,15 +80,11 @@ if(BUILD_DOCS)
         CACHE STRING "append verbatim code to sphinx' conf.py")
 endif()
 
-# legacy
-
-set(HAVE_VISIBILITY 1)
-set(HAVE_SHARED_ENABLED 1)
-set(HAVE_GCC_BUILTIN_ATOMIC 1)
-
 # modules
 
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
+include(GNUInstallDirs)
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
 
 if(NOT BUILD_DOCSONLY)
     include(CMake/_Include.cmake)