aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/FindScotch.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindScotch.cmake')
-rw-r--r--cmake/FindScotch.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/FindScotch.cmake b/cmake/FindScotch.cmake
new file mode 100644
index 000000000..530340b16
--- /dev/null
+++ b/cmake/FindScotch.cmake
@@ -0,0 +1,24 @@
+# Pastix requires SCOTCH or METIS (partitioning and reordering tools)
+
+if (SCOTCH_INCLUDES AND SCOTCH_LIBRARIES)
+ set(SCOTCH_FIND_QUIETLY TRUE)
+endif (SCOTCH_INCLUDES AND SCOTCH_LIBRARIES)
+
+find_path(SCOTCH_INCLUDES
+ NAMES
+ scotch.h
+ PATHS
+ $ENV{SCOTCHDIR}
+ ${INCLUDE_INSTALL_DIR}
+ PATH_SUFFIXES
+ scotch
+)
+
+
+find_library(SCOTCH_LIBRARIES scotch PATHS $ENV{SCOTCHDIR} ${LIB_INSTALL_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SCOTCH DEFAULT_MSG
+ SCOTCH_INCLUDES SCOTCH_LIBRARIES)
+
+mark_as_advanced(SCOTCH_INCLUDES SCOTCH_LIBRARIES)