From 51fded2b9aea9f5e14a73ecf43a101c8b89ecef1 Mon Sep 17 00:00:00 2001 From: Florent Pruvost <florent.pruvost@inria.fr> Date: Thu, 12 Jul 2018 16:00:59 +0200 Subject: [PATCH] add dependency to SPM lib --- modules/find/FindPASTIX.cmake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/modules/find/FindPASTIX.cmake b/modules/find/FindPASTIX.cmake index 66d1e45..6364c83 100644 --- a/modules/find/FindPASTIX.cmake +++ b/modules/find/FindPASTIX.cmake @@ -20,6 +20,7 @@ # - MPI # - HWLOC # - BLAS +# - SPM # # COMPONENTS are optional libraries PASTIX could be linked with, # Use it to drive detection of a specific compilation chain @@ -248,6 +249,17 @@ else() find_package(BLAS) endif() +# PASTIX depends on SPM +#------------------------ +if (NOT PASTIX_FIND_QUIETLY) + message(STATUS "Looking for PASTIX - Try to detect SPM") +endif() +if (PASTIX_FIND_REQUIRED) + find_package(SPM REQUIRED) +else() + find_package(SPM) +endif() + # Optional dependencies # --------------------- @@ -704,6 +716,22 @@ if(PASTIX_LIBRARIES) endif() list(APPEND REQUIRED_LIBS "${BLAS_LIBRARIES}") endif() + # SPM + if (SPM_FOUND) + if (SPM_INCLUDE_DIRS) + list(APPEND REQUIRED_INCDIRS "${SPM_INCLUDE_DIRS}") + endif() + if (SPM_CFLAGS_OTHER) + list(APPEND REQUIRED_FLAGS "${SPM_CFLAGS_OTHER}") + endif() + if (SPM_LDFLAGS_OTHER) + list(APPEND REQUIRED_LDFLAGS "${SPM_LDFLAGS_OTHER}") + endif() + if (SPM_LIBRARY_DIRS) + list(APPEND REQUIRED_LIBDIRS "${SPM_LIBRARY_DIRS}") + endif() + list(APPEND REQUIRED_LIBS "${SPM_LIBRARIES}") + endif() # SCOTCH if (PASTIX_LOOK_FOR_SCOTCH AND SCOTCH_FOUND) if (SCOTCH_INCLUDE_DIRS) -- GitLab