summaryrefslogtreecommitdiff
path: root/dev-util/cmake/files/cmake-2.8.6-FindBLAS.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/cmake/files/cmake-2.8.6-FindBLAS.patch')
-rw-r--r--dev-util/cmake/files/cmake-2.8.6-FindBLAS.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-util/cmake/files/cmake-2.8.6-FindBLAS.patch b/dev-util/cmake/files/cmake-2.8.6-FindBLAS.patch
new file mode 100644
index 00000000000..75b2814b9a0
--- /dev/null
+++ b/dev-util/cmake/files/cmake-2.8.6-FindBLAS.patch
@@ -0,0 +1,34 @@
+--- cmake-2.8.6.orig/Modules/FindBLAS.cmake 2011-10-09 23:32:55.096356973 +0800
++++ cmake-2.8.6/Modules/FindBLAS.cmake 2011-10-09 23:35:10.235667390 +0800
+@@ -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)
+
+@@ -621,4 +635,6 @@
+ endif(NOT BLAS_FIND_QUIETLY)
+ endif(BLA_F95)
+
++endif(NOT BLAS_FOUND)
++
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})