diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 6d60c9d86a..b6664dfe26 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -7,6 +7,11 @@ FindBLAS Find Basic Linear Algebra Subprograms (BLAS) library +Version modified for Gentoo Linux. +If a valid PkgConfig configuration is found, this overrides and cancels +all further checks. The upstream behavior can be restored by defining +GENTOO_REMOVE_CMAKE_BLAS_HACK + This module finds an installed Fortran library that implements the `BLAS linear-algebra interface`_. @@ -281,6 +286,11 @@ function(_add_blas_target) endif() endfunction() +# first, try PkgConfig +if(NOT DEFINED GENTOO_REMOVE_CMAKE_BLAS_HACK) + set(BLA_PREFER_PKGCONFIG ON) +endif() + if(CMAKE_Fortran_COMPILER_LOADED) include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake) else()