Permalink
Browse files

Fix MKL x86 detection on Windows

  • Loading branch information...
1 parent ec5038f commit 7e99911c82f33269cb223b33b646858f79eb2f04 @sovrasov sovrasov committed Jan 11, 2017
Showing with 5 additions and 5 deletions.
  1. +5 −5 cmake/OpenCVFindMKL.cmake
@@ -79,12 +79,13 @@ if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
include(CheckTypeSize)
CHECK_TYPE_SIZE(int _sizeof_int)
if (_sizeof_int EQUAL 4)
- set(MKL_LP64 "lp64")
+ set(MKL_ARCH_SUFFIX "lp64")
else()
- set(MKL_LP64 "ilp64")
+ set(MKL_ARCH_SUFFIX "ilp64")
endif()
else()
set(MKL_ARCH "ia32")
+ set(MKL_ARCH_SUFFIX "c")
endif()
if(${MKL_VERSION_STR} VERSION_GREATER "11.3.0" OR ${MKL_VERSION_STR} VERSION_EQUAL "11.3.0")
@@ -94,7 +95,7 @@ if(${MKL_VERSION_STR} VERSION_GREATER "11.3.0" OR ${MKL_VERSION_STR} VERSION_EQU
set(mkl_lib_list
mkl_core
- mkl_intel_${MKL_LP64})
+ mkl_intel_${MKL_ARCH_SUFFIX})
if(MKL_WITH_TBB)
list(APPEND mkl_lib_list mkl_tbb_thread tbb)
@@ -112,7 +113,6 @@ else()
mkl_fail()
endif()
-
set(MKL_LIBRARIES "")
foreach(lib ${mkl_lib_list})
find_library(${lib} ${lib} ${mkl_lib_find_paths})
@@ -133,4 +133,4 @@ else()
#it's ugly but helps to avoid cyclic lib problem
set(MKL_LIBRARIES ${MKL_LIBRARIES} ${MKL_LIBRARIES} ${MKL_LIBRARIES} "-lpthread" "-lm" "-ldl")
set(MKL_LIBRARIES ${MKL_LIBRARIES} CACHE STRING "MKL libarries")
-endif()
+endif()

0 comments on commit 7e99911

Please sign in to comment.