From eaa0d613bf38ccae10b8e97661e69df20fd7aeda Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 22 Oct 2015 18:43:03 -0400 Subject: [PATCH] define deal.II version always as X.Y.Z --- VERSION | 2 +- cmake/config/ConfigVersion.cmake.in | 2 +- cmake/setup_deal_ii.cmake | 19 +++++-------------- 3 files changed, 7 insertions(+), 16 deletions(-) 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}) -- 2.39.5