From f0d52f55f155ac3f3e2bafa072a4e0d7f1431d76 Mon Sep 17 00:00:00 2001 From: Jakub Benda Date: Sun, 18 Nov 2018 14:52:13 +0000 Subject: FindBLAS: Consolidate duplicated code related to MKL on Windows The code that decides which library suffix to use for MKL libraries in Windows was in two places. This commit consolidates it in one place. --- Modules/FindBLAS.cmake | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index d150826..369bf06 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -205,6 +205,13 @@ endif () #BLAS in intel mkl 10+ library? (em64t 64bit) if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") if (NOT BLAS_LIBRARIES) + if (WIN32) + if (BLA_STATIC) + set(BLAS_mkl_DLL_SUFFIX "") + else() + set(BLAS_mkl_DLL_SUFFIX "_dll") + endif() + endif() if (BLA_VENDOR MATCHES "_64ilp") set(BLAS_mkl_ILP_MODE "ilp64") else () @@ -226,12 +233,6 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") set(BLAS_mkl_SEARCH_SYMBOL sgemm_f95) set(_LIBRARIES BLAS95_LIBRARIES) if (WIN32) - if (BLA_STATIC) - set(BLAS_mkl_DLL_SUFFIX "") - else() - set(BLAS_mkl_DLL_SUFFIX "_dll") - endif() - # Find the main file (32-bit or 64-bit) set(BLAS_SEARCH_LIBS_WIN_MAIN "") if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") @@ -293,12 +294,6 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") set(BLAS_mkl_SEARCH_SYMBOL sgemm) set(_LIBRARIES BLAS_LIBRARIES) if (WIN32) - if (BLA_STATIC) - set(BLAS_mkl_DLL_SUFFIX "") - else() - set(BLAS_mkl_DLL_SUFFIX "_dll") - endif() - # Find the main file (32-bit or 64-bit) set(BLAS_SEARCH_LIBS_WIN_MAIN "") if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") -- cgit v0.12