From 0b4428e92fd64f49db3622be1b9870e26096c494 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 27 Feb 2018 13:21:19 +0300 Subject: [PATCH] cmake: AVX512 with clang --- cmake/OpenCVCompilerOptimizations.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVCompilerOptimizations.cmake b/cmake/OpenCVCompilerOptimizations.cmake index eca540f12b..feb144b317 100644 --- a/cmake/OpenCVCompilerOptimizations.cmake +++ b/cmake/OpenCVCompilerOptimizations.cmake @@ -223,7 +223,7 @@ if(X86 OR X86_64) ocv_update(CPU_SSSE3_FLAGS_ON "-mssse3") ocv_update(CPU_SSE2_FLAGS_ON "-msse2") ocv_update(CPU_SSE_FLAGS_ON "-msse") - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0") + if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")) # GCC >= 5.0 # -mavx512f -mavx512pf -mavx512er -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi ocv_update(CPU_AVX_512F_FLAGS_ON "-mavx512f") ocv_update(CPU_AVX512_SKX_FLAGS_ON "-mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq")