Created
July 10, 2016 10:02
-
-
Save skleinbo/cbf5840a5b5e228907d95f59aeb033e9 to your computer and use it in GitHub Desktop.
ArrayFire FindCBLAS MKL fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeModules/FindCBLAS.cmake b/CMakeModules/FindCBLAS.cmake | |
index 52fa448..b6d73c0 100644 | |
--- a/CMakeModules/FindCBLAS.cmake | |
+++ b/CMakeModules/FindCBLAS.cmake | |
@@ -157,7 +157,7 @@ MACRO(CHECK_ALL_LIBRARIES | |
"${CBLAS_LIB_DIR}" "${CBLAS_LIB32_DIR}" "${CBLAS_LIB64_DIR}" | |
PATH_SUFFIXES atlas | |
) | |
- IF(NOT ${_prefix}_${library}_LIBRARY) | |
+ IF(NOT ${_prefix}_${_library}_LIBRARY) | |
LIST(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".so.3") | |
FIND_LIBRARY(${_prefix}_${_library}_LIBRARY | |
NAMES ${_library} | |
@@ -166,7 +166,7 @@ MACRO(CHECK_ALL_LIBRARIES | |
"${CBLAS_LIB_DIR}" "${CBLAS_LIB32_DIR}" "${CBLAS_LIB64_DIR}" | |
PATH_SUFFIXES atlas | |
) | |
- ENDIF(NOT ${_prefix}_${library}_LIBRARY) | |
+ ENDIF(NOT ${_prefix}_${_library}_LIBRARY) | |
ENDIF(APPLE) | |
MARK_AS_ADVANCED(${_prefix}_${_library}_LIBRARY) | |
@@ -176,10 +176,8 @@ MACRO(CHECK_ALL_LIBRARIES | |
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) | |
+ IF(_search_include) | |
FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include} | |
/opt/intel/mkl/include | |
/usr/include | |
@@ -201,12 +199,12 @@ MACRO(CHECK_ALL_LIBRARIES | |
SET(_libraries_work FALSE) | |
ENDIF(${_prefix}${_combined_name}_INCLUDE) | |
- ELSE(_bug_search_include) | |
+ ELSE(_search_include) | |
SET(${_prefix}_INCLUDE_DIR) | |
SET(${_prefix}_INCLUDE_FILE ${_include}) | |
- ENDIF(_bug_search_include) | |
+ ENDIF(_search_include) | |
- IF (_bug_libraries_work_check) | |
+ IF (_libraries_work_check) | |
# Test this combination of libraries. | |
IF(_libraries_work) | |
SET(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment