P4EST_VERSION_SUBMINOR "${P4EST_VERSION}")
# Now for the patch number such as in 0.3.4.1. If there
- # is no patch number, then the REGEX REPLACE will fail,
- # setting P4EST_VERSION_PATCH to P4EST_VERSION. If that
+ # is no patch number, then REGEX REPLACE will set
+ # P4EST_VERSION_PATCH to an empty string. If that
# is the case, then set the patch number to zero
STRING(REGEX REPLACE
- "^[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)?.*$" "\\1"
+ "^[0-9]+\\.[0-9]+\\.[0-9]+\\.?(([0-9]+)?).*$" "\\1"
P4EST_VERSION_PATCH "${P4EST_VERSION}")
- IF(${P4EST_VERSION_PATCH} STREQUAL "${P4EST_VERSION}")
+ IF("${P4EST_VERSION_PATCH}" STREQUAL "")
SET(P4EST_VERSION_PATCH "0")
ENDIF()
ENDIF()
"^[0-9]+\\.([0-9]+).*$" "\\1"
TRILINOS_VERSION_MINOR "${Trilinos_VERSION}")
- # If there is no subminor number, then the REGEX REPLACE will fail,
- # setting TRILINOS_VERSION_PATCH to TRILINOS_VERSION. If that
- # is the case, then set the subminor number to zero
+ # If there is no subminor number,
+ # TRILINOS_VERSION_SUBMINOR is set to an empty string.
+ # If that is the case, set the subminor number to zero
STRING(REGEX REPLACE
- "^[0-9]+\\.[0-9]+\\.([0-9]+)?.*$" "\\1"
+ "^[0-9]+\\.[0-9]+\\.?(([0-9]+)?).*$" "\\1"
TRILINOS_VERSION_SUBMINOR "${Trilinos_VERSION}")
- IF(${TRILINOS_VERSION_SUBMINOR} STREQUAL "${Trilinos_VERSION}")
+ IF("${TRILINOS_VERSION_SUBMINOR}" STREQUAL "")
SET(TRILINOS_VERSION_SUBMINOR "0")
- ENDIF()
+ ENDIF()
ENDIF()
#