]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update sundials version number extraction 12545/head
authorFabian Castelli <fabian.castelli@kit.edu>
Sat, 3 Jul 2021 12:54:25 +0000 (14:54 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Mon, 5 Jul 2021 07:08:18 +0000 (09:08 +0200)
cmake/configure/configure_sundials.cmake
cmake/modules/FindSUNDIALS.cmake

index 1f772f18c0179559678f0d9c0859fda91c980504..b8042db44f7ec5795909b082efdab24a42101322 100644 (file)
@@ -22,23 +22,24 @@ MACRO(FEATURE_SUNDIALS_FIND_EXTERNAL var)
 
   IF(SUNDIALS_FOUND)
     SET(${var} TRUE)
-  ENDIF()
-
-  #
-  # We require at least sundials 3.0.0
-  #
-  IF(SUNDIALS_VERSION VERSION_LESS 3.0.0)
 
-    MESSAGE(STATUS "Could not find a sufficient Sundials installation: "
-      "deal.II requires at least version 3.0.0, but version ${SUNDIALS_VERSION} was found."
-      )
-    SET(SUNDIALS_ADDITIONAL_ERROR_STRING
-      ${SUNDIALS_ADDITIONAL_ERROR_STRING}
-      "The SUNDIALS installation (found at \"${SUNDIALS_DIR}\")\n"
-      "with version ${SUNDIALS_VERSION} is too old.\n"
-      "deal.II requires at least version 3.0.0.\n\n"
-      )
-    SET(${var} FALSE)
+    #
+    # We require at least sundials 3.0.0
+    #
+    SET(_version_required 3.0.0)
+    IF(SUNDIALS_VERSION VERSION_LESS ${_version_required})
+      MESSAGE(STATUS "Could not find a sufficient Sundials installation: "
+        "deal.II requires at least version ${_version_required}, "
+        "but version ${SUNDIALS_VERSION} was found."
+        )
+      SET(SUNDIALS_ADDITIONAL_ERROR_STRING
+        ${SUNDIALS_ADDITIONAL_ERROR_STRING}
+        "The SUNDIALS installation (found at \"${SUNDIALS_DIR}\")\n"
+        "with version ${SUNDIALS_VERSION} is too old.\n"
+        "deal.II requires at least version ${_version_required}.\n\n"
+        )
+      SET(${var} FALSE)
+    ENDIF()
   ENDIF()
 ENDMACRO()
 
index abb86246bfbdfa5d272adcd89cc9dd287432bfe3..dbfb90377cf5730919cd9e25d097db500db54402 100644 (file)
@@ -116,19 +116,11 @@ IF(NOT SUNDIALS_CONFIG_H MATCHES "-NOTFOUND")
   STRING(REGEX REPLACE "^.*SUNDIALS_VERSION_PATCH.*([0-9]+).*" "\\1"
     SUNDIALS_VERSION_PATCH "${SUNDIALS_VERSION_PATCH_STRING}"
     )
-ENDIF()
-IF(NOT "${SUNDIALS_VERSION_MAJOR}")
-  SET(SUNDIALS_VERSION_MAJOR "0")
-ENDIF()
-IF(NOT "${SUNDIALS_VERSION_MINOR}")
-  SET(SUNDIALS_VERSION_MINOR "0")
-ENDIF()
-IF(NOT "${SUNDIALS_VERSION_PATCH}")
-  SET(SUNDIALS_VERSION_PATCH "0")
-ENDIF()
-SET(SUNDIALS_VERSION
+
+  SET(SUNDIALS_VERSION
     "${SUNDIALS_VERSION_MAJOR}.${SUNDIALS_VERSION_MINOR}.${SUNDIALS_VERSION_PATCH}"
     )
+ENDIF()
 
 DEAL_II_PACKAGE_HANDLE(SUNDIALS
   LIBRARIES REQUIRED

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.