summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.ibm.com>2019-02-12 15:59:05 +1100
committerDaniel Black <daniel@linux.ibm.com>2019-02-12 15:59:05 +1100
commitb2dd88f095812e5d378e8caf3d397d0e8c27d1d2 (patch)
tree13e755c685bf920f75ec471f7bbc9240e578c679 /cmake
parent9f56dd738235dc21204fb60a307b8681e6677ba7 (diff)
downloadmariadb-git-b2dd88f095812e5d378e8caf3d397d0e8c27d1d2.tar.gz
cmake/wsrep: allow disabling -DWITH_WSREP=OFF
Diffstat (limited to 'cmake')
-rw-r--r--cmake/wsrep.cmake20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake
index 44e00649993..37ed0c78cf5 100644
--- a/cmake/wsrep.cmake
+++ b/cmake/wsrep.cmake
@@ -28,20 +28,20 @@ OPTION(WITH_WSREP_ALL
"Build all components of WSREP (unit tests, sample programs)"
OFF)
-# Set the patch version
-SET(WSREP_PATCH_VERSION "22")
+IF(WITH_WSREP)
+ # Set the patch version
+ SET(WSREP_PATCH_VERSION "22")
-# Obtain wsrep API version
-FILE(STRINGS "${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26/wsrep_api.h" WSREP_API_VERSION
- LIMIT_COUNT 1 REGEX "WSREP_INTERFACE_VERSION")
-STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}")
+ # Obtain wsrep API version
+ FILE(STRINGS "${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26/wsrep_api.h" WSREP_API_VERSION
+ LIMIT_COUNT 1 REGEX "WSREP_INTERFACE_VERSION")
+ STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}")
-SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
- CACHE INTERNAL "WSREP version")
+ SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
+ CACHE INTERNAL "WSREP version")
-SET(WSREP_PROC_INFO ${WITH_WSREP})
+ SET(WSREP_PROC_INFO ${WITH_WSREP})
-IF(WITH_WSREP)
SET(WSREP_PATCH_VERSION "wsrep_${WSREP_VERSION}")
if (NOT WITH_WSREP_ALL)
SET(WSREP_LIB_WITH_UNIT_TESTS OFF CACHE BOOL