[arrayfire] 381/408: Try PkgConf first to find CBLAS
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.
commit 644d074867ff35821a87b3b6794efe6e7cd4006a
Author: Marius Brehler <marius.brehler at tu-dortmund.de>
Date: Tue Sep 8 15:20:57 2015 +0200
Try PkgConf first to find CBLAS
---
CMakeModules/FindCBLAS.cmake | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/CMakeModules/FindCBLAS.cmake b/CMakeModules/FindCBLAS.cmake
index ee47b3a..d08b3c2 100644
--- a/CMakeModules/FindCBLAS.cmake
+++ b/CMakeModules/FindCBLAS.cmake
@@ -21,6 +21,29 @@ SET(CBLAS_INCLUDE_DIR CACHE STRING
SET(CBLAS_INCLUDE_FILE CACHE STRING
"CBLAS header name")
+
+# If a valid PkgConfig configuration for cblas is found, this overrides and cancels
+# all further checks.
+FIND_PACKAGE(PkgConfig)
+IF(PKG_CONFIG_FOUND)
+ PKG_CHECK_MODULES(PC_CBLAS cblas)
+ENDIF(PKG_CONFIG_FOUND)
+
+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)
+
SET(INTEL_MKL_ROOT_DIR CACHE STRING
"Root directory of the Intel MKL")
@@ -277,3 +300,5 @@ IF(NOT CBLAS_FIND_QUIETLY)
MESSAGE(STATUS "CBLAS library not found.")
ENDIF()
ENDIF(NOT CBLAS_FIND_QUIETLY)
+
+ENDIF(PC_CBLAS_FOUND)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list