From da61046ff8cc29a5c6ba1e7b0eedb31b079cc6d4 Mon Sep 17 00:00:00 2001 From: Hu Shiwen Date: Fri, 19 Apr 2019 15:59:11 +0800 Subject: [PATCH] change mxnet_option behavior fix omp with msvc with mkldnn --- CMakeLists.txt | 2 +- cmake/Utils.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cd68e14093c..7f320f3f654a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON IF mxnet_option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects support if ON mxnet_option(USE_LAPACK "Build with lapack support" ON) mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON) -mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE)) +mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) ) mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") AND (NOT CMAKE_CROSSCOMPILING)) mxnet_option(USE_OPERATOR_TUNING "Enable auto-tuning of operators" ON IF NOT MSVC) mxnet_option(USE_GPERFTOOLS "Build with GPerfTools support" OFF) diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake index ac6ce3926c37..6b427db85ec9 100644 --- a/cmake/Utils.cmake +++ b/cmake/Utils.cmake @@ -216,7 +216,7 @@ function(mxnet_option variable description value) option(${variable} "${description}" ${__value}) endif() else() - unset(${variable} CACHE) + option(${variable} "${description}" OFF) endif() endfunction()