From: Fabian Castelli Date: Wed, 30 Jun 2021 10:22:58 +0000 (+0200) Subject: Require GINKGO 1.4.0 X-Git-Tag: v9.4.0-rc1~1011^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c4f1d711310d42bab5e9c579826109e4f3453d5;p=dealii.git Require GINKGO 1.4.0 --- diff --git a/cmake/configure/configure_2_ginkgo.cmake b/cmake/configure/configure_2_ginkgo.cmake index 7dffba8ca6..9ad7f50279 100644 --- a/cmake/configure/configure_2_ginkgo.cmake +++ b/cmake/configure/configure_2_ginkgo.cmake @@ -17,4 +17,31 @@ # Configuration for the Ginkgo library: # +MACRO(FEATURE_GINKGO_FIND_EXTERNAL var) + FIND_PACKAGE(GINKGO) + + IF(GINKGO_FOUND) + SET(${var} TRUE) + + # + # We require at least version 1.4.0 + # - The interface requires in fact only GINKGO 1.3.0, however, below 1.4.0 + # the LD_LIBRARY_PATH has to be set manually by: + # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GINKGO_DIR/lib + # + SET(_version_required 1.4.0) + IF(GINKGO_VERSION VERSION_LESS ${_version_required}) + MESSAGE(STATUS "Insufficient ginkgo installation found: " + "At least version ${_version_required} is required." + ) + SET(GINKGO_ADDITIONAL_ERROR_STRING + "Insufficient ginkgo installation found!\n" + "At least version ${_version_required} is required.\n" + ) + SET(${var} FALSE) + + ENDIF() + ENDIF() +ENDMACRO() + CONFIGURE_FEATURE(GINKGO) diff --git a/cmake/modules/FindGINKGO.cmake b/cmake/modules/FindGINKGO.cmake index b3c030e325..eace1bcc63 100644 --- a/cmake/modules/FindGINKGO.cmake +++ b/cmake/modules/FindGINKGO.cmake @@ -20,6 +20,7 @@ # # GINKGO_INCLUDE_DIRS # GINKGO_INTERFACE_LINK_FLAGS +# GINGKO_VERSION # SET(GINKGO_DIR "" CACHE PATH "An optional hint to a GINKGO installation") @@ -63,6 +64,13 @@ FOREACH(_library ginkgo ${GINKGO_INTERFACE_LINK_LIBRARIES}) ) ENDFOREACH() +# +# Get ginkgo version number +# +IF(Ginkgo_FOUND) + SET(GINKGO_VERSION "${GINKGO_PROJECT_VERSION}") +ENDIF() + DEAL_II_PACKAGE_HANDLE(GINKGO LIBRARIES REQUIRED ${_libraries} INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR