Commit f68c6ccd authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-26579 fixup

parent ca4bc3e3
...@@ -50,13 +50,15 @@ MACRO(GET_MYSQL_VERSION) ...@@ -50,13 +50,15 @@ MACRO(GET_MYSQL_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION)
MYSQL_GET_CONFIG_VALUE("SERVER_MATURITY" SERVER_MATURITY) MYSQL_GET_CONFIG_VALUE("SERVER_MATURITY" SERVER_MATURITY)
IF(NOT "${MAJOR_VERSION}" MATCHES "[0-9]+" OR IF(NOT "${MAJOR_VERSION}" MATCHES "[0-9]+" OR
NOT "${MINOR_VERSION}" MATCHES "[0-9]+" OR NOT "${MINOR_VERSION}" MATCHES "[0-9]+" OR
NOT "${PATCH_VERSION}" MATCHES "[0-9]+") NOT "${PATCH_VERSION}" MATCHES "[0-9]+")
MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.") MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
ENDIF() ENDIF()
IF((NOT TINY_VERSION) AND (EXTRA_VERSION MATCHES "[\\-][0-9]+")) IF((NOT TINY_VERSION) AND (EXTRA_VERSION MATCHES "[\\-][0-9]+"))
STRING(REPLACE "-" "" TINY_VERSION "${EXTRA_VERSION}") STRING(REPLACE "-" "" TINY_VERSION "${EXTRA_VERSION}")
ELSE()
SET(TINY_VERSION "0")
ENDIF() ENDIF()
SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}") SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
SET(SERVER_VERSION ${VERSION}) SET(SERVER_VERSION ${VERSION})
...@@ -121,10 +123,6 @@ ENDIF() ...@@ -121,10 +123,6 @@ ENDIF()
IF(MSVC) IF(MSVC)
# Tiny version is used to identify the build, it can be set with cmake -DTINY_VERSION=<number> # Tiny version is used to identify the build, it can be set with cmake -DTINY_VERSION=<number>
# to bzr revno for example (in the CI builds) # to bzr revno for example (in the CI builds)
IF(NOT TINY_VERSION)
SET(TINY_VERSION "0")
ENDIF()
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
SET(FILETYPE VFT_APP) SET(FILETYPE VFT_APP)
......
...@@ -240,8 +240,8 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) ...@@ -240,8 +240,8 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
SET(NONEXEFILES) SET(NONEXEFILES)
FOREACH(v MAJOR_VERSION MINOR_VERSION PATCH_VERSION TINY_VERSION) FOREACH(v MAJOR_VERSION MINOR_VERSION PATCH_VERSION TINY_VERSION)
IF(NOT ${v}) IF(NOT DEFINED ${v})
MESSAGE(FATAL_ERROR "${v} is not set") MESSAGE(FATAL_ERROR "${v} is not defined")
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
SET(default_version "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}.${TINY_VERSION}") SET(default_version "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}.${TINY_VERSION}")
......
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