]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: FindSLEPC.cmake: Fix regex for version number 7261/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 1 Oct 2018 18:18:35 +0000 (13:18 -0500)
committerDavid Wells <drwells@email.unc.edu>
Wed, 3 Oct 2018 12:45:01 +0000 (08:45 -0400)
Similarly to what was fixed in #7203, fix the regex to also pick up two
(or more digit) version numbers correctly.

cmake/modules/FindSLEPC.cmake

index 2de9a29aa0d5d0c66da5ba73a1a59e24ccee4508..761875b26e236b576efde7f23ad1f106e1a5598a 100644 (file)
@@ -66,22 +66,22 @@ SET(SLEPC_SLEPCVERSION_H "${SLEPC_INCLUDE_DIR_COMMON}/slepcversion.h")
 IF(EXISTS ${SLEPC_SLEPCVERSION_H})
   FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_MAJOR_STRING
     REGEX "#define.*SLEPC_VERSION_MAJOR")
-  STRING(REGEX REPLACE "^.*SLEPC_VERSION_MAJOR.*([0-9]+).*" "\\1"
+  STRING(REGEX REPLACE "^.*SLEPC_VERSION_MAJOR.* ([0-9]+).*" "\\1"
     SLEPC_VERSION_MAJOR "${SLEPC_VERSION_MAJOR_STRING}"
     )
   FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_MINOR_STRING
     REGEX "#define.*SLEPC_VERSION_MINOR")
-  STRING(REGEX REPLACE "^.*SLEPC_VERSION_MINOR.*([0-9]+).*" "\\1"
+  STRING(REGEX REPLACE "^.*SLEPC_VERSION_MINOR.* ([0-9]+).*" "\\1"
     SLEPC_VERSION_MINOR "${SLEPC_VERSION_MINOR_STRING}"
     )
   FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_SUBMINOR_STRING
     REGEX "#define.*SLEPC_VERSION_SUBMINOR")
-  STRING(REGEX REPLACE "^.*SLEPC_VERSION_SUBMINOR.*([0-9]+).*" "\\1"
+  STRING(REGEX REPLACE "^.*SLEPC_VERSION_SUBMINOR.* ([0-9]+).*" "\\1"
     SLEPC_VERSION_SUBMINOR "${SLEPC_VERSION_SUBMINOR_STRING}"
     )
   FILE(STRINGS "${SLEPC_SLEPCVERSION_H}" SLEPC_VERSION_PATCH_STRING
     REGEX "#define.*SLEPC_VERSION_PATCH")
-  STRING(REGEX REPLACE "^.*SLEPC_VERSION_PATCH.*([0-9]+).*" "\\1"
+  STRING(REGEX REPLACE "^.*SLEPC_VERSION_PATCH.* ([0-9]+).*" "\\1"
     SLEPC_VERSION_PATCH "${SLEPC_VERSION_PATCH_STRING}"
     )
   SET(SLEPC_VERSION

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.