diff --git a/cmake/cblas.cmake b/cmake/cblas.cmake index 75bb8bdda21809ee9375304104478c58c61b91e2..6056b53bc2218fb24d2e97b281b9a0d68bc9a306 100644 --- a/cmake/cblas.cmake +++ b/cmake/cblas.cmake @@ -102,7 +102,7 @@ if(NOT DEFINED CBLAS_PROVIDER AND WITH_SYSTEM_BLAS) find_library(REFERENCE_CBLAS_LIBRARY NAMES cblas PATHS ${REFERENCE_CBLAS_LIB_SEARCH_PATHS}) find_library(REFERENCE_BLAS_LIBRARY NAMES blas PATHS - ${REFERENCE_BLAS_LIB_SEARCH_PATHS}) + ${REFERENCE_CBLAS_LIB_SEARCH_PATHS}) if(REFERENCE_CBLAS_INCLUDE_DIR AND REFERENCE_CBLAS_LIBRARY) set(CBLAS_PROVIDER REFERENCE_CBLAS) @@ -127,9 +127,9 @@ endif() # linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas) include_directories(${CBLAS_INC_DIR}) -if(NOT ${CBLAS_PROVIDER} STREQUAL MKLML) - target_link_libraries(cblas ${CBLAS_LIBRARIES}) -elseif(${CBLAS_PROVIDER} STREQUAL REFERENCE_CBLAS) +if(${CBLAS_PROVIDER} STREQUAL REFERENCE_CBLAS) target_link_libraries(cblas gfortran ${CBLAS_LIBRARIES} ${REFERENCE_BLAS_LIBRARY}) +elseif(NOT ${CBLAS_PROVIDER} STREQUAL MKLML) + target_link_libraries(cblas ${CBLAS_LIBRARIES}) endif()