diff options
author | Desire NUENTSA <desire.nuentsa_wakam@inria.fr> | 2012-11-13 18:13:13 +0100 |
---|---|---|
committer | Desire NUENTSA <desire.nuentsa_wakam@inria.fr> | 2012-11-13 18:13:13 +0100 |
commit | 0412dff97b7628ac539bd51c2854216fdab11f11 (patch) | |
tree | e83538d9c0db48e54711631947ba2c1c41745b51 /cmake/FindSPQR.cmake | |
parent | 9cf77ce1d80cf17aa79c5da95b578ee2a4490152 (diff) |
Add more useful functions to SPQR interface
Diffstat (limited to 'cmake/FindSPQR.cmake')
-rw-r--r-- | cmake/FindSPQR.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/FindSPQR.cmake b/cmake/FindSPQR.cmake new file mode 100644 index 000000000..55c4d9f6e --- /dev/null +++ b/cmake/FindSPQR.cmake @@ -0,0 +1,27 @@ +# SPQR lib usually requires linking to a blas and lapack library. +# It is up to the user of this module to find a BLAS and link to it. + +# SPQR lib requires Cholmod, colamd and amd as well. +# FindCholmod.cmake can be used to find those packages before finding spqr + +if (SPQR_INCLUDES AND SPQR_LIBRARIES) + set(SPQR_FIND_QUIETLY TRUE) +endif (SPQR_INCLUDES AND SPQR_LIBRARIES) + +find_path(SPQR_INCLUDES + NAMES + SuiteSparseQR.hpp + PATHS + $ENV{SPQRDIR} + ${INCLUDE_INSTALL_DIR} + PATH_SUFFIXES + suitesparse + ufsparse +) + +find_library(SPQR_LIBRARIES spqr $ENV{SPQRDIR} ${LIB_INSTALL_DIR}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SPQR DEFAULT_MSG SPQR_INCLUDES SPQR_LIBRARIES) + +mark_as_advanced(SPQR_INCLUDES SPQR_LIBRARIES)
\ No newline at end of file |