Add -march=skylake-avx512 when required
fixes
@@ -71,6 +71,8 @@ if (X86_64 OR X86)
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -v -o ${PROJECT_BINARY_DIR}/avx512.o -x c ${PROJECT_BINARY_DIR}/avx512.tmp OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
if (NO_AVX512 EQUAL 1)
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
+else()
+set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
endif()
file(REMOVE "avx512.tmp" "avx512.o")
endif()
