瀏覽代碼

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.
Jakub Benda 7 年之前
父節點
當前提交
f0d52f55f1
共有 1 個文件被更改,包括 7 次插入12 次删除
  1. 7 12
      Modules/FindBLAS.cmake

+ 7 - 12
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")