diff --git a/modules/find/FindBLAS.cmake b/modules/find/FindBLAS.cmake index c470e5a59bd404cdbe7534c92a2b99def2cc6a8c..c366b9b5e1e07fbc6ce9390ff12f1f13d6e1074e 100644 --- a/modules/find/FindBLAS.cmake +++ b/modules/find/FindBLAS.cmake @@ -366,16 +366,43 @@ if( PKG_CONFIG_EXECUTABLE AND NOT BLAS_GIVEN_BY_USER ) # try different blas if (BLA_VENDOR STREQUAL "Intel10_64lp") pkg_search_module(BLAS mkl-${MKL_STR_BLA_STATIC}-lp64-iomp) + if (BLAS_FOUND) + set (BLAS_VENDOR_FOUND "Intel MKL") + endif() elseif(BLA_VENDOR STREQUAL "Intel10_64lp_seq") pkg_search_module(BLAS mkl-${MKL_STR_BLA_STATIC}-lp64-seq) + if (BLAS_FOUND) + set (BLAS_VENDOR_FOUND "Intel MKL") + endif() elseif(BLA_VENDOR STREQUAL "Open") pkg_search_module(BLAS openblas) + if (BLAS_FOUND) + set (BLAS_VENDOR_FOUND "Openblas") + endif() elseif(BLA_VENDOR STREQUAL "Generic") pkg_search_module(BLAS blas) + if (BLAS_FOUND) + set (BLAS_VENDOR_FOUND "Netlib or other Generic libblas") + endif() else() - pkg_search_module(BLAS blas) - pkg_search_module(BLAS openblas) - pkg_search_module(BLAS mkl-${MKL_STR_BLA_STATIC}-lp64-seq) + if (NOT BLAS_FOUND) + pkg_search_module(BLAS mkl-${MKL_STR_BLA_STATIC}-lp64-seq) + if (BLAS_FOUND) + set (BLAS_VENDOR_FOUND "Intel MKL") + endif() + endif() + if (NOT BLAS_FOUND) + pkg_search_module(BLAS openblas) + if (BLAS_FOUND) + set (BLAS_VENDOR_FOUND "Openblas") + endif() + endif() + if (NOT BLAS_FOUND) + pkg_search_module(BLAS blas) + if (BLAS_FOUND) + set (BLAS_VENDOR_FOUND "Netlib or other Generic libblas") + endif() + endif() endif() if (NOT BLAS_FIND_QUIETLY) diff --git a/modules/find/FindLAPACK.cmake b/modules/find/FindLAPACK.cmake index 20cfadadbfc55ab1e5b7b5313bbb042d9230ddf9..73f57dad7f95164b12ebeb47fdc0756d740d4acf 100644 --- a/modules/find/FindLAPACK.cmake +++ b/modules/find/FindLAPACK.cmake @@ -396,16 +396,43 @@ if(BLAS_FOUND) # try different blas if (BLA_VENDOR STREQUAL "Intel10_64lp") pkg_search_module(LAPACK mkl-${MKL_STR_BLA_STATIC}-lp64-iomp) + if (LAPACK_FOUND) + set (LAPACK_VENDOR_FOUND "Intel MKL") + endif() elseif(BLA_VENDOR STREQUAL "Intel10_64lp_seq") pkg_search_module(LAPACK mkl-${MKL_STR_BLA_STATIC}-lp64-seq) + if (LAPACK_FOUND) + set (LAPACK_VENDOR_FOUND "Intel MKL") + endif() elseif(BLA_VENDOR STREQUAL "Open") pkg_search_module(LAPACK openblas) + if (LAPACK_FOUND) + set (LAPACK_VENDOR_FOUND "Openblas") + endif() elseif(BLA_VENDOR STREQUAL "Generic") pkg_search_module(LAPACK lapack) + if (LAPACK_FOUND) + set (LAPACK_VENDOR_FOUND "Netlib or other Generic liblapack") + endif() else() - pkg_search_module(LAPACK lapack) - pkg_search_module(LAPACK openblas) - pkg_search_module(LAPACK mkl-${MKL_STR_BLA_STATIC}-lp64-seq) + if (NOT LAPACK_FOUND) + pkg_search_module(LAPACK mkl-${MKL_STR_BLA_STATIC}-lp64-seq) + if (LAPACK_FOUND) + set (LAPACK_VENDOR_FOUND "Intel MKL") + endif() + endif() + if (NOT LAPACK_FOUND) + pkg_search_module(LAPACK openblas) + if (LAPACK_FOUND) + set (LAPACK_VENDOR_FOUND "Openblas") + endif() + endif() + if (NOT LAPACK_FOUND) + pkg_search_module(LAPACK lapack) + if (LAPACK_FOUND) + set (LAPACK_VENDOR_FOUND "Netlib or other Generic liblapack") + endif() + endif() endif() if (NOT LAPACK_FIND_QUIETLY)