]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Require GINKGO 1.4.0
authorFabian Castelli <fabian.castelli@kit.edu>
Wed, 30 Jun 2021 10:22:58 +0000 (12:22 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Tue, 24 Aug 2021 09:15:30 +0000 (11:15 +0200)
cmake/configure/configure_2_ginkgo.cmake
cmake/modules/FindGINKGO.cmake

index 7dffba8ca64bf7514a1066b511de1bb5d62797ce..9ad7f5027929d1284a9877a1f8d43d53a67018a5 100644 (file)
 # 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)
index b3c030e32530cb045c9380bc51b223f3babdc662..eace1bcc631255ef2433e077cc065e526421d881 100644 (file)
@@ -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

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.