diff options
Diffstat (limited to 'sci-libs/arrayfire/files/FindCBLAS.patch')
-rw-r--r-- | sci-libs/arrayfire/files/FindCBLAS.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/sci-libs/arrayfire/files/FindCBLAS.patch b/sci-libs/arrayfire/files/FindCBLAS.patch new file mode 100644 index 000000000..16c619716 --- /dev/null +++ b/sci-libs/arrayfire/files/FindCBLAS.patch @@ -0,0 +1,48 @@ +--- b/CMakeModules/FindCBLAS.cmake 2015-01-09 14:00:29.328281398 +0100 ++++ a/CMakeModules/FindCBLAS.cmake 2015-01-09 14:02:52.549276153 +0100 +@@ -1,3 +1,9 @@ ++# ++# Version modified for Gentoo Linux ++# If a valid PkgConfig configuration for cblas is found, this overrides and cancels ++# all further checks. ++# ++ + # Using FindCBLAS.cmake from the following repo + # https://github.com/clementfarabet/THC/blob/master/COPYRIGHT.txt + +@@ -18,6 +24,29 @@ SET(CBLAS_LIBRARIES) + SET(CBLAS_INCLUDE_DIR) + SET(CBLAS_INCLUDE_FILE) + ++ ++# ++# first, try PkgConfig ++# ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(PC_CBLAS cblas) ++if(PC_CBLAS_FOUND) ++ foreach(PC_LIB ${PC_CBLAS_LIBRARIES}) ++ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_CBLAS_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_CBLAS_LIBRARY_DIRS}") ++ endif (NOT ${PC_LIB}_LIBRARY) ++ list(APPEND CBLAS_LIBRARIES ${${PC_LIB}_LIBRARY}) ++ endforeach(PC_LIB) ++ find_package_handle_standard_args(CBLAS DEFAULT_MSG CBLAS_LIBRARIES) ++ mark_as_advanced(CBLAS_LIBRARIES) ++else(PC_CBLAS_FOUND) ++message(STATUS "No PkgConfig configuration for CBLAS found; starting more extensive search.") ++ ++ ++ ++ ++ + # CBLAS in Intel mkl + FIND_PACKAGE(MKL) + IF (MKL_FOUND AND NOT CBLAS_LIBRARIES) +@@ -203,3 +232,5 @@ IF(NOT CBLAS_FIND_QUIETLY) + MESSAGE(STATUS "CBLAS library not found.") + ENDIF(CBLAS_FOUND) + ENDIF(NOT CBLAS_FIND_QUIETLY) ++ ++endif(PC_CBLAS_FOUND) |