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()
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