diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-09-25 23:00:45 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-10-01 23:38:27 +0200 |
commit | 3620910eeac8f118c9a6cb8a1c0ec23e56fb5d98 (patch) | |
tree | d08462d84d10324bd05836c968288d8ab1739e11 /cmake/wsrep.cmake | |
parent | b04f848176b0d8af41eb3627ba1b6ed4dd3327e3 (diff) | |
download | mariadb-git-3620910eeac8f118c9a6cb8a1c0ec23e56fb5d98.tar.gz |
cleanup: galera merge, simple changes
Diffstat (limited to 'cmake/wsrep.cmake')
-rw-r--r-- | cmake/wsrep.cmake | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index d3c8da6a72a..211ed30ff4c 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -14,6 +14,17 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Galera library does not compile with windows +# +IF(UNIX) + SET(with_wsrep_default ON) +ELSE() + SET(with_wsrep_default OFF) +ENDIF() + +OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default}) + # Set the patch version SET(WSREP_PATCH_VERSION "10") @@ -32,42 +43,14 @@ IF (DEFINED ENV{WSREP_REV}) SET(WSREP_PATCH_REVNO $ENV{WSREP_REV}) ENDIF() -# Obtain wsrep API version -EXECUTE_PROCESS( - COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h | cut -d '\"' -f 2" - OUTPUT_VARIABLE WSREP_API_VERSION - RESULT_VARIABLE RESULT -) -#FILE(WRITE "wsrep_config" "Debug: WSREP_API_VERSION result: ${RESULT}\n") -STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_API_VERSION "${WSREP_API_VERSION}") +SET(WSREP_INTERFACE_VERSION 25) -IF(NOT WSREP_PATCH_REVNO) - MESSAGE(WARNING "Could not determine bzr revision number, WSREP_VERSION will " - "not contain the revision number.") - SET(WSREP_VERSION - "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}" - ) -ELSE() - SET(WSREP_VERSION - "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}" - ) -ENDIF() +SET(WSREP_VERSION + "${WSREP_INTERFACE_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}") -# -# Galera library does not compile with windows and solaris -# -IF(UNIX) -OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ON) -ELSE() -OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" OFF) -ENDIF() +SET(WSREP_PROC_INFO ${WITH_WSREP}) -MACRO (BUILD_WITH_WSREP) - SET(WSREP_C_FLAGS "-DWITH_WSREP -DWSREP_PROC_INFO -DMYSQL_MAX_VARIABLE_VALUE_LEN=2048") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WSREP_C_FLAGS}") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WSREP_C_FLAGS}") +IF(WITH_WSREP) SET(COMPILATION_COMMENT "${COMPILATION_COMMENT}, wsrep_${WSREP_VERSION}") - #SET(WITH_EMBEDDED_SERVER OFF CACHE INTERNAL "" FORCE) -ENDMACRO() +ENDIF() -# |