1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-18 21:44:02 +03:00
mariadb-columnstore-engine/cmake/columnstore_version.cmake
Andrew Hutchings 7489d0bfd0 MCOL-3625 Rename packages
Rename packages to MariaDB-columnstore-engine, MariaDB-columnstore-libs
and MariaDB-columnstore-platform.

Also add the "columnstore-" prefix the the components so that MariaDB's
packaging system understands then and add a line to include them in
MariaDB's packaging.

In addition
* Fix S3 building for dist source build
* Fix Debian 10 dependency issue
* Fix git handling for dist builds
* Add support for MariaDB's RPM building
* Use MariaDB's PCRE and readline
* Removes a few dead files
* Fix Boost noncopyable includes
2019-12-04 11:04:39 +00:00

49 lines
1.7 KiB
CMake

# Generate "something" to trigger cmake rerun when VERSION changes
CONFIGURE_FILE(
${ENGINE_SRC_DIR}/VERSION
${CMAKE_BINARY_DIR}/VERSION.dep
)
# Read value for a variable from VERSION.
MACRO(COLUMNSTORE_GET_CONFIG_VALUE keyword var)
IF(NOT ${var})
FILE (STRINGS ${ENGINE_SRC_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
IF(str)
STRING(REPLACE "${keyword}=" "" str ${str})
STRING(REGEX REPLACE "[ ].*" "" str "${str}")
SET(${var} ${str})
ENDIF()
ENDIF()
ENDMACRO()
MACRO(GET_COLUMNSTORE_VERSION)
COLUMNSTORE_GET_CONFIG_VALUE("COLUMNSTORE_VERSION_MAJOR" CS_MAJOR_VERSION)
COLUMNSTORE_GET_CONFIG_VALUE("COLUMNSTORE_VERSION_MINOR" CS_MINOR_VERSION)
COLUMNSTORE_GET_CONFIG_VALUE("COLUMNSTORE_VERSION_PATCH" CS_PATCH_VERSION)
COLUMNSTORE_GET_CONFIG_VALUE("COLUMNSTORE_VERSION_EXTRA" CS_EXTRA_VERSION)
COLUMNSTORE_GET_CONFIG_VALUE("COLUMNSTORE_VERSION_RELEASE" CS_RELEASE_VERSION)
IF(NOT "${CS_MAJOR_VERSION}" MATCHES "[0-9]+" OR
NOT "${CS_MINOR_VERSION}" MATCHES "[0-9]+" OR
NOT "${CS_PATCH_VERSION}" MATCHES "[0-9]+")
MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
ENDIF()
SET(VERSION "${CS_MAJOR_VERSION}.${CS_MINOR_VERSION}.${CS_PATCH_VERSION}${CS_EXTRA_VERSION}")
MESSAGE(STATUS "MariaDB-Columnstore ${VERSION}")
IF (NOT INSTALL_LAYOUT)
SET(CPACK_PACKAGE_VERSION_MAJOR ${CS_MAJOR_VERSION})
SET(CPACK_PACKAGE_VERSION_MINOR ${CS_MINOR_VERSION})
SET(CPACK_PACKAGE_VERSION_PATCH ${CS_PATCH_VERSION}${CS_EXTRA_VERSION})
ENDIF ()
SET(PACKAGE_VERSION "${CS_MAJOR_VERSION}.${CS_MINOR_VERSION}.${CS_PATCH_VERSION}${CS_EXTRA_VERSION}")
SET(PACKAGE_RELEASE "${CS_RELEASE_VERSION}")
ENDMACRO()
# Get columnstore version
GET_COLUMNSTORE_VERSION()