summaryrefslogtreecommitdiff
blob: 2ffa2d2a3ec0b84eadb7ba675d263ee48eb032e3 (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
29
30
31
32
33
34
35
diff -ruN cmake-2.8.5.orig/Modules/FindBLAS.cmake cmake-2.8.5/Modules/FindBLAS.cmake
--- cmake-2.8.5.orig/Modules/FindBLAS.cmake	2011-07-08 14:21:44.000000000 +0200
+++ cmake-2.8.5/Modules/FindBLAS.cmake	2011-07-17 17:34:45.384557963 +0200
@@ -1,3 +1,9 @@
+#
+# Version modified for Gentoo Linux
+# If a valid PkgConfig configuration for blas is found, this overrides and cancels
+# all further checks.
+#
+
 # - Find BLAS library
 # This module finds an installed fortran library that implements the BLAS
 # linear-algebra interface (see http://www.netlib.org/blas/).
@@ -39,6 +45,14 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+#
+# first, try PkgConfig
+#
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(BLAS blas)
+if(NOT BLAS_FOUND)
+message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.")
+
 include(CheckFunctionExists)
 include(CheckFortranFunctionExists)
 
@@ -559,3 +573,6 @@
     endif(BLAS_FOUND)
   endif(NOT BLAS_FIND_QUIETLY)
 endif(BLA_F95)
+
+
+endif(NOT BLAS_FOUND)