]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: FindGINKGO: recover full library paths 11413/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 23 Dec 2020 03:03:14 +0000 (21:03 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 23 Dec 2020 03:04:25 +0000 (21:04 -0600)
cmake/modules/FindGINKGO.cmake

index 37648a26fe9f53d480a951e2afff4c5cc935369b..2ab3fa18dafb521c48daddf653c0af0a84bb95f8 100644 (file)
@@ -43,13 +43,29 @@ SET(CMAKE_MODULE_PATH ${_cmake_module_path})
 #
 unset(GINKGO_CXX_COMPILER)
 
+#
+# We'd like to have the full library names but the Ginkgo package only
+# exports a list with short names. So check again for every lib and store
+# the full path:
+#
+SET(_libraries "")
+FOREACH(_library ${GINKGO_INTERFACE_LINK_LIBRARIES})
+  LIST(APPEND _libraries GINKGO_LIBRARY_${_library})
+  DEAL_II_FIND_LIBRARY(GINKGO_LIBRARY_${_library}
+    NAMES ${_library}
+    HINTS ${GINKGO_INSTALL_LIBRARY_DIR}
+    NO_DEFAULT_PATH
+    NO_CMAKE_ENVIRONMENT_PATH
+    NO_CMAKE_PATH
+    NO_SYSTEM_ENVIRONMENT_PATH
+    NO_CMAKE_SYSTEM_PATH
+    NO_CMAKE_FIND_ROOT_PATH
+    )
+ENDFOREACH()
+
 DEAL_II_PACKAGE_HANDLE(GINKGO
-  LIBRARIES
-    REQUIRED GINKGO_INTERFACE_LINK_LIBRARIES
-  INCLUDE_DIRS
-    REQUIRED GINKGO_INSTALL_INCLUDE_DIR
-  USER_INCLUDE_DIRS
-    REQUIRED GINKGO_INSTALL_INCLUDE_DIR
-  CLEAR
-    Ginkgo_DIR
+  LIBRARIES REQUIRED ${_libraries}
+  INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR
+  USER_INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR
+  CLEAR Ginkgo_DIR ${_libraries}
   )

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.