diff --git a/CMakeLists.txt b/CMakeLists.txt index fcff1de56742d027b4b10d003fd463e7335720b7..ae8728f4d4c22f45f13a283a448e907337f37f7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,14 +108,11 @@ else() set(THIRD_PARTY_BUILD_TYPE Release) endif() -if(WITH_MKL) - set(WITH_MKLML ON) - set(WITH_MKLDNN ${AVX2_FOUND}) - if(NOT WITH_MKLDNN) - message(WARNING "Do not have AVX2 intrinsics and disabled MKL-DNN") - endif() +set(WITH_MKLML ${WITH_MKL}) +if (WITH_MKL AND ${AVX2_FOUND}) + set(WITH_MKLDNN ON) else() - set(WITH_MKLML OFF) + message(STATUS "Do not have AVX2 intrinsics and disabled MKL-DNN") set(WITH_MKLDNN OFF) endif()