| 1 |
--- cmake-2.8.6.orig/Modules/FindBLAS.cmake 2011-10-09 23:32:55.096356973 +0800
|
| 2 |
+++ cmake-2.8.6/Modules/FindBLAS.cmake 2011-10-09 23:35:10.235667390 +0800
|
| 3 |
@@ -1,3 +1,9 @@
|
| 4 |
+#
|
| 5 |
+# Version modified for Gentoo Linux
|
| 6 |
+# If a valid PkgConfig configuration for blas is found, this overrides and cancels
|
| 7 |
+# all further checks.
|
| 8 |
+#
|
| 9 |
+
|
| 10 |
# - Find BLAS library
|
| 11 |
# This module finds an installed fortran library that implements the BLAS
|
| 12 |
# linear-algebra interface (see http://www.netlib.org/blas/).
|
| 13 |
@@ -39,6 +45,14 @@
|
| 14 |
# (To distribute this file outside of CMake, substitute the full
|
| 15 |
# License text for the above reference.)
|
| 16 |
|
| 17 |
+#
|
| 18 |
+# first, try PkgConfig
|
| 19 |
+#
|
| 20 |
+find_package(PkgConfig REQUIRED)
|
| 21 |
+pkg_check_modules(BLAS blas)
|
| 22 |
+if(NOT BLAS_FOUND)
|
| 23 |
+message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.")
|
| 24 |
+
|
| 25 |
include(CheckFunctionExists)
|
| 26 |
include(CheckFortranFunctionExists)
|
| 27 |
|
| 28 |
@@ -621,4 +635,6 @@
|
| 29 |
endif(NOT BLAS_FIND_QUIETLY)
|
| 30 |
endif(BLA_F95)
|
| 31 |
|
| 32 |
+endif(NOT BLAS_FOUND)
|
| 33 |
+
|
| 34 |
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|