cmake: honor env
authorMichael Wallner <mike@php.net>
Wed, 4 Nov 2020 14:57:58 +0000 (15:57 +0100)
committerMichael Wallner <mike@php.net>
Wed, 4 Nov 2020 14:57:58 +0000 (15:57 +0100)
CMakeConfig.txt
CMakeLists.txt

index 8f764d3c8e4a1ac9273a2e73fefdc8278ec6344a..3c44a776af5aabbf0fd0ff53ec6599a9a10a3e92 100644 (file)
@@ -14,7 +14,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,21 +31,29 @@ 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}"
index 18278f63f4824a6d47a07f2078d87ec4bf2ba935..19755ffd54cd299c884a5866920799eec036cd42 100644 (file)
@@ -36,8 +36,8 @@ if(NOT BUILD_DOCSONLY)
             memtouch
             )
 
-    add_subdirectory(include)
     add_subdirectory(src)
+    add_subdirectory(include)
     add_subdirectory(support)
     add_subdirectory(test)