]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: FindSLEPC.cmake: Fix regex for version number 7252/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 1 Oct 2018 18:18:35 +0000 (13:18 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 1 Oct 2018 18:18:35 +0000 (13:18 -0500)
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 4094354ddaf3a4b786003911e949705c9bcbb777..32118007e59003709b10fa0c8c05429e0102c1f5 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.