From: Timo Heister Date: Thu, 22 Oct 2015 22:43:03 +0000 (-0400) Subject: define deal.II version always as X.Y.Z X-Git-Tag: v8.4.0-rc2~298^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1774%2Fhead;p=dealii.git define deal.II version always as X.Y.Z --- diff --git a/VERSION b/VERSION index d4140c6c26..579969df86 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.4.pre +8.4.0-pre diff --git a/cmake/config/ConfigVersion.cmake.in b/cmake/config/ConfigVersion.cmake.in index af6afe8a61..627c1bea4d 100644 --- a/cmake/config/ConfigVersion.cmake.in +++ b/cmake/config/ConfigVersion.cmake.in @@ -3,7 +3,7 @@ # As suggested by the cmake documentation # -set(PACKAGE_VERSION "@DEAL_II_VERSION_MAJOR@.@DEAL_II_VERSION_MINOR@") +set(PACKAGE_VERSION "@DEAL_II_VERSION_MAJOR@.@DEAL_II_VERSION_MINOR@.@DEAL_II_VERSION_SUBMINOR@") # Check whether the requested PACKAGE_FIND_VERSION is compatible if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") diff --git a/cmake/setup_deal_ii.cmake b/cmake/setup_deal_ii.cmake index c5dd78fc07..014c9e89d6 100644 --- a/cmake/setup_deal_ii.cmake +++ b/cmake/setup_deal_ii.cmake @@ -77,9 +77,8 @@ FILE(STRINGS "${CMAKE_SOURCE_DIR}/VERSION" _version LIMIT_COUNT 1) SET_IF_EMPTY(DEAL_II_PACKAGE_VERSION "${_version}") # -# We expect a version number of the form "X.Y.Z", where X and Y are always -# numbers and Z is either a third number (for a release version) or a short -# string. +# We expect a version number of the form "X.Y.Z" or "X.Y.Z-bla", where X, Y, Z +# are always numbers and bla is a short string ("pre", "rc0", "rc1", etc.). # STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" DEAL_II_VERSION_MAJOR "${DEAL_II_PACKAGE_VERSION}" @@ -87,18 +86,10 @@ STRING(REGEX REPLACE "^([0-9]+)\\..*" "\\1" STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_VERSION_MINOR "${DEAL_II_PACKAGE_VERSION}" ) +STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" + DEAL_II_VERSION_SUBMINOR "${DEAL_II_PACKAGE_VERSION}" + ) -# -# If Z is not a number, replace it with "0", otherwise extract version -# number: -# -IF(DEAL_II_PACKAGE_VERSION MATCHES "^[0-9]+\\.[0-9]+.*\\.[0-9]+.*") - STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+.*\\.([0-9]+).*" "\\1" - DEAL_II_VERSION_SUBMINOR "${DEAL_II_PACKAGE_VERSION}" - ) -ELSE() - SET(DEAL_II_VERSION_SUBMINOR "0") -ENDIF() SET(DEAL_II_VERSION ${DEAL_II_VERSION_MAJOR}.${DEAL_II_VERSION_MINOR}.${DEAL_II_VERSION_SUBMINOR})