From fc67655d7a2b78cffd0f6c8795a7a65bd24018e7 Mon Sep 17 00:00:00 2001 From: Anton Chernov Date: Mon, 16 Jul 2018 21:06:29 +0200 Subject: [PATCH] Fixed MKLML for mac --- cmake/DownloadMKLML.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/DownloadMKLML.cmake b/cmake/DownloadMKLML.cmake index b633cd2387cc..830e6cc2a247 100644 --- a/cmake/DownloadMKLML.cmake +++ b/cmake/DownloadMKLML.cmake @@ -31,6 +31,14 @@ if(MSVC) file(COPY ${MKLROOT}/lib/libiomp5md.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${MKLROOT}/lib/mklml.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CMAKE_SOURCE_DIR}/3rdparty/mkldnn/config_template.vcxproj.user DESTINATION ${CMAKE_SOURCE_DIR}) +elseif(APPLE) + set(MKL_NAME "mklml_mac_2018.0.3.20180406") + file(DOWNLOAD "https://github.com/intel/mkl-dnn/releases/download/v0.14/${MKL_NAME}.tgz" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz" EXPECTED_MD5 "d41d8cd98f00b204e9800998ecf8427e" SHOW_PROGRESS) + execute_process(COMMAND "tar" "-xzf" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz" "-C" "${CMAKE_CURRENT_BINARY_DIR}/mklml/") + set(MKLROOT "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}") + + file(COPY ${MKLROOT}/lib/libiomp5.dylib DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + file(COPY ${MKLROOT}/lib/libmklml.dylib DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) elseif(UNIX) set(MKL_NAME "mklml_lnx_2018.0.3.20180406") file(DOWNLOAD "https://github.com/intel/mkl-dnn/releases/download/v0.14/${MKL_NAME}.tgz" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz" EXPECTED_MD5 "DAF7EFC3C1C0036B447213004467A8AE" SHOW_PROGRESS) @@ -40,14 +48,6 @@ elseif(UNIX) file(COPY ${MKLROOT}/lib/libiomp5.so DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${MKLROOT}/lib/libmklml_gnu.so DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${MKLROOT}/lib/libmklml_intel.so DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -elseif(APPLE) - set(MKL_NAME "mklml_mac_2018.0.3.20180406.tgz") - file(DOWNLOAD "https://github.com/intel/mkl-dnn/releases/download/v0.14/${MKL_NAME}.tgz" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz" EXPECTED_MD5 "23a6f7fd04fb1fa6de0d52a2ec5a2a14" SHOW_PROGRESS) - execute_process(COMMAND "tar" "-xzf" "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}.tgz" "-C" "${CMAKE_CURRENT_BINARY_DIR}/mklml/") - set(MKLROOT "${CMAKE_CURRENT_BINARY_DIR}/mklml/${MKL_NAME}") - - file(COPY ${MKLROOT}/lib/libiomp5.dylib DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - file(COPY ${MKLROOT}/lib/libmklml.dylib DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) else() message(FATAL_ERROR "Wrong platform") endif()