Commit b2dd88f0 authored by Daniel Black's avatar Daniel Black

cmake/wsrep: allow disabling -DWITH_WSREP=OFF

parent 9f56dd73
...@@ -28,20 +28,20 @@ OPTION(WITH_WSREP_ALL ...@@ -28,20 +28,20 @@ OPTION(WITH_WSREP_ALL
"Build all components of WSREP (unit tests, sample programs)" "Build all components of WSREP (unit tests, sample programs)"
OFF) OFF)
# Set the patch version IF(WITH_WSREP)
SET(WSREP_PATCH_VERSION "22") # Set the patch version
SET(WSREP_PATCH_VERSION "22")
# Obtain wsrep API version # Obtain wsrep API version
FILE(STRINGS "${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26/wsrep_api.h" 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") LIMIT_COUNT 1 REGEX "WSREP_INTERFACE_VERSION")
STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}") STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}")
SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}" SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
CACHE INTERNAL "WSREP 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}") SET(WSREP_PATCH_VERSION "wsrep_${WSREP_VERSION}")
if (NOT WITH_WSREP_ALL) if (NOT WITH_WSREP_ALL)
SET(WSREP_LIB_WITH_UNIT_TESTS OFF CACHE BOOL SET(WSREP_LIB_WITH_UNIT_TESTS OFF CACHE BOOL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment