From 9a6c5112dda701d0f25366d6cb6f1a37f25c3b65 Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Wed, 18 Apr 2018 13:07:00 +0200
Subject: [PATCH] add PASTIX_LIBRARIES_FORTRAN variable

---
 modules/find/FindPASTIX.cmake | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/modules/find/FindPASTIX.cmake b/modules/find/FindPASTIX.cmake
index 72248cc..4d58c46 100644
--- a/modules/find/FindPASTIX.cmake
+++ b/modules/find/FindPASTIX.cmake
@@ -45,6 +45,7 @@
 #  PASTIX_INCLUDE_DIRS      - pastix include directories
 #  PASTIX_LIBRARY_DIRS      - pastix link directories
 #  PASTIX_LIBRARIES         - pastix libraries to be linked (absolute path)
+#  PASTIX_LIBRARIES_FORTRAN - pastix Fortran libraries to be linked (absolute path)
 #  PASTIX_CFLAGS_OTHER_DEP  - pastix + dependencies compiler flags without headers paths
 #  PASTIX_LDFLAGS_OTHER_DEP - pastix + dependencies linker flags without libraries
 #  PASTIX_INCLUDE_DIRS_DEP  - pastix + dependencies include directories
@@ -896,6 +897,18 @@ endif()
 mark_as_advanced(PASTIX_DIR)
 mark_as_advanced(PASTIX_DIR_FOUND)
 
+if (PASTIX_LIBRARY_DIRS)
+  find_library(PASTIX_pastixf_LIBRARY
+            NAMES pastixf
+            HINTS ${PASTIX_LIBRARY_DIRS})
+  mark_as_advanced(PASTIX_pastixf_LIBRARY)
+  if (PASTIX_pastixf_LIBRARY)
+    set(PASTIX_LIBRARIES_FORTRAN ${PASTIX_pastixf_LIBRARY})
+  else()
+    set(PASTIX_LIBRARIES_FORTRAN "PASTIX_LIBRARIES_FORTRAN-NOTFOUND")
+  endif()
+endif()
+
 # check that PASTIX has been found
 # ---------------------------------
 include(FindPackageHandleStandardArgs)
-- 
GitLab