summaryrefslogtreecommitdiff
path: root/dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch
diff options
context:
space:
mode:
authorChris Reffett <creffett@gentoo.org>2013-04-09 15:24:19 -0400
committerChris Reffett <creffett@gentoo.org>2013-04-09 15:24:49 -0400
commit7bbe1e2216b7fb36cb70f7487071bf23e00287f9 (patch)
tree12190802c6b26b1715732d63bad6e303a17cfae3 /dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch
parent5d155b2253e3871e8c2a986f78342885c8c6ec3b (diff)
downloadkde-7bbe1e2216b7fb36cb70f7487071bf23e00287f9.tar.gz
kde-7bbe1e2216b7fb36cb70f7487071bf23e00287f9.tar.bz2
kde-7bbe1e2216b7fb36cb70f7487071bf23e00287f9.zip
[dev-util/cmake] Version bump. Tests restricted for now due to one failing. Removed the implicit include patch because it appears to have been implemented in a slightly different way in the code. Re-rolled several patches.
Package-Manager: portage-2.2.0_alpha171
Diffstat (limited to 'dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch')
-rw-r--r--dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch b/dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch
new file mode 100644
index 00000000000..02e44fb240b
--- /dev/null
+++ b/dev-util/cmake/files/cmake-2.8.11-FindBLAS.patch
@@ -0,0 +1,48 @@
+--- b/Modules/FindBLAS.cmake
++++ a/Modules/FindBLAS.cmake
+@@ -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/).
+@@ -40,6 +46,26 @@
+ # (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(PC_BLAS blas)
++if(PC_BLAS_FOUND)
++ foreach(PC_LIB ${PC_BLAS_LIBRARIES})
++ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_BLAS_LIBRARY_DIRS} )
++ if (NOT ${PC_LIB}_LIBRARY)
++ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_BLAS_LIBRARY_DIRS}")
++ endif (NOT ${PC_LIB}_LIBRARY)
++ list(APPEND BLAS_LIBRARIES ${${PC_LIB}_LIBRARY})
++ endforeach(PC_LIB)
++ find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARIES)
++ mark_as_advanced(BLAS_LIBRARIES)
++else(PC_BLAS_FOUND)
++message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.")
++
++
++
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
+
+@@ -604,3 +630,8 @@
+ endif()
+
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
++
++
++endif(PC_BLAS_FOUND)
++
++