[arrayfire] 03/84: Minor cleanup to FindCBLAS.cmake
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository arrayfire.
commit cac82df08ca7ffed155ffa91c96c9c9eb61abc44
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Mon Dec 7 15:34:36 2015 -0500
Minor cleanup to FindCBLAS.cmake
- Remove searching for MKL
- Fix bug when looking up symbols
- Now check for libblas on ubuntu based systems
---
CMakeModules/FindCBLAS.cmake | 52 +++++++++++++++++++-------------------------
1 file changed, 22 insertions(+), 30 deletions(-)
diff --git a/CMakeModules/FindCBLAS.cmake b/CMakeModules/FindCBLAS.cmake
index d08b3c2..b0cd3bd 100644
--- a/CMakeModules/FindCBLAS.cmake
+++ b/CMakeModules/FindCBLAS.cmake
@@ -36,7 +36,7 @@ IF(PC_CBLAS_FOUND)
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})
+ LIST(APPEND CBLAS_LIBRARIES ${${PC_LIB}_LIBRARY})
ENDFOREACH(PC_LIB)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CBLAS DEFAULT_MSG CBLAS_LIBRARIES)
@@ -146,12 +146,12 @@ MACRO(CHECK_ALL_LIBRARIES
SET(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
SET(_libraries_work ${${_prefix}_${_library}_LIBRARY})
-
ENDIF(_libraries_work)
ENDFOREACH(_library)
# Test include
SET(_bug_search_include ${_search_include}) #CMAKE BUG!!! SHOULD NOT BE THAT
+ SET(_bug_libraries_work_check ${_libraries_work_check}) #CMAKE BUG!!! SHOULD NOT BE THAT
IF(_bug_search_include)
FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include} ${_paths})
@@ -170,8 +170,7 @@ MACRO(CHECK_ALL_LIBRARIES
SET(${_prefix}_INCLUDE_FILE ${_include})
ENDIF(_bug_search_include)
-
- IF (_libraries_work_check)
+ IF (_bug_libraries_work_check)
# Test this combination of libraries.
IF(_libraries_work)
SET(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}})
@@ -179,9 +178,13 @@ MACRO(CHECK_ALL_LIBRARIES
SET(CMAKE_REQUIRED_LIBRARIES)
MARK_AS_ADVANCED(${_prefix}${_combined_name}_WORKS)
SET(_libraries_work ${${_prefix}${_combined_name}_WORKS})
+
IF(_verbose AND _libraries_work)
- MESSAGE(STATUS "Libraries found")
+ MESSAGE(STATUS "CBLAS Symbols FOUND")
+ ELSE()
+ MESSAGE(STATUS "CBLAS Symbols NOTFOUND")
ENDIF(_verbose AND _libraries_work)
+
ENDIF(_libraries_work)
ENDIF()
@@ -216,31 +219,6 @@ IF( NOT CBLAS_LIBRARIES )
TRUE)
ENDIF( NOT CBLAS_LIBRARIES )
-# MKL
-IF (INTEL_MKL_ROOT_DIR)
- IF ("${SIZE_OF_VOIDP}" EQUAL 8)
- SET(MKL_CBLAS_EXT mkl_gf_lp64)
- ELSE()
- SET(MKL_CBLAS_EXT mkl_gf)
- ENDIF()
-
- IF(NOT CBLAS_LIBRARIES)
- CHECK_ALL_LIBRARIES(
- CBLAS_LIBRARIES
- CBLAS
- cblas_dgemm
- ""
- "${MKL_CBLAS_EXT};mkl_intel_thread"
- "mkl_cblas.h"
- TRUE,
- FALSE)
- ENDIF(NOT CBLAS_LIBRARIES)
-
- IF (CBLAS_LIBRARIES)
- SET(MKL_CBLAS_FOUND TRUE)
- ENDIF()
-ENDIF()
-
# CBLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
IF(NOT CBLAS_LIBRARIES)
CHECK_ALL_LIBRARIES(
@@ -280,6 +258,20 @@ IF(NOT CBLAS_LIBRARIES)
TRUE)
ENDIF(NOT CBLAS_LIBRARIES)
+# Generic BLAS+CBLAS library
+# Debian based systems have them as single library
+IF(NOT CBLAS_LIBRARIES)
+ CHECK_ALL_LIBRARIES(
+ CBLAS_LIBRARIES
+ CBLAS
+ cblas_dgemm
+ ""
+ "blas"
+ "cblas.h"
+ TRUE,
+ TRUE)
+ENDIF(NOT CBLAS_LIBRARIES)
+
IF(CBLAS_LIBRARIES)
IF (NOT MKL_CBLAS_FOUND)
SET(CBLAS_FOUND TRUE)
--
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