From: Andreas Fink Date: Mon, 17 Sep 2018 13:48:20 +0000 (+0200) Subject: *fix* petsc version 3.10 works now too (minor version was found by the regexp as... X-Git-Tag: v9.0.1~7^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d168f5201c023a92bd74f8ea18307e3ea70d02ce;p=dealii.git *fix* petsc version 3.10 works now too (minor version was found by the regexp as "0" and not "10") --- diff --git a/cmake/modules/FindPETSC.cmake b/cmake/modules/FindPETSC.cmake index 90fb01a08d..a49426ebd9 100644 --- a/cmake/modules/FindPETSC.cmake +++ b/cmake/modules/FindPETSC.cmake @@ -96,22 +96,22 @@ SET(PETSC_PETSCVERSION_H "${PETSC_INCLUDE_DIR_COMMON}/petscversion.h") IF(EXISTS ${PETSC_PETSCVERSION_H}) FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_MAJOR_STRING REGEX "#define.*PETSC_VERSION_MAJOR") - STRING(REGEX REPLACE "^.*PETSC_VERSION_MAJOR.*([0-9]+).*" "\\1" + STRING(REGEX REPLACE "^.*PETSC_VERSION_MAJOR.* ([0-9]+).*" "\\1" PETSC_VERSION_MAJOR "${PETSC_VERSION_MAJOR_STRING}" ) FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_MINOR_STRING REGEX "#define.*PETSC_VERSION_MINOR") - STRING(REGEX REPLACE "^.*PETSC_VERSION_MINOR.*([0-9]+).*" "\\1" + STRING(REGEX REPLACE "^.*PETSC_VERSION_MINOR.* ([0-9]+).*" "\\1" PETSC_VERSION_MINOR "${PETSC_VERSION_MINOR_STRING}" ) FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_SUBMINOR_STRING REGEX "#define.*PETSC_VERSION_SUBMINOR") - STRING(REGEX REPLACE "^.*PETSC_VERSION_SUBMINOR.*([0-9]+).*" "\\1" + STRING(REGEX REPLACE "^.*PETSC_VERSION_SUBMINOR.* ([0-9]+).*" "\\1" PETSC_VERSION_SUBMINOR "${PETSC_VERSION_SUBMINOR_STRING}" ) FILE(STRINGS "${PETSC_PETSCVERSION_H}" PETSC_VERSION_PATCH_STRING REGEX "#define.*PETSC_VERSION_PATCH") - STRING(REGEX REPLACE "^.*PETSC_VERSION_PATCH.*([0-9]+).*" "\\1" + STRING(REGEX REPLACE "^.*PETSC_VERSION_PATCH.* ([0-9]+).*" "\\1" PETSC_VERSION_PATCH "${PETSC_VERSION_PATCH_STRING}" ) SET(PETSC_VERSION