blob: 0f8611771828dda0dd9a8cdae6c797c06f5f3a5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
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()
|