Commit b62f25c6 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub Committed by Vladislav Vaintroub

MDEV-26579 fixup

parent 0f59810b
......@@ -50,13 +50,15 @@ MACRO(GET_MYSQL_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION)
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 "${PATCH_VERSION}" MATCHES "[0-9]+")
MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
ENDIF()
IF((NOT TINY_VERSION) AND (EXTRA_VERSION MATCHES "[\\-][0-9]+"))
STRING(REPLACE "-" "" TINY_VERSION "${EXTRA_VERSION}")
ELSE()
SET(TINY_VERSION "0")
ENDIF()
SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
MESSAGE(STATUS "MariaDB ${VERSION}")
......@@ -120,10 +122,6 @@ ENDIF()
IF(MSVC)
# 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)
IF(NOT TINY_VERSION)
SET(TINY_VERSION "0")
ENDIF()
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
SET(FILETYPE VFT_APP)
......
......@@ -249,8 +249,8 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
SET(NONEXEFILES)
FOREACH(v MAJOR_VERSION MINOR_VERSION PATCH_VERSION TINY_VERSION)
IF(NOT ${v})
MESSAGE(FATAL_ERROR "${v} is not set")
IF(NOT DEFINED ${v})
MESSAGE(FATAL_ERROR "${v} is not defined")
ENDIF()
ENDFOREACH()
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