From fa53b903db657b0d5f5bfe5554c7218442c539c9 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 10 Oct 2018 19:22:01 +0200 Subject: [PATCH] Add -march=skylake-avx512 to CFLAGS when the target is Skylake Should fix 1806 and #1801 --- cmake/system.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/system.cmake b/cmake/system.cmake index 18b2c3b87..4dc50e64f 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -41,6 +41,11 @@ if (DEFINED BINARY AND DEFINED TARGET AND BINARY EQUAL 32) endif () endif () +if (DEFINED TARGET AND ${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512) + set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512") + set (FCOMMON_OPT "${FCOMMON_OPT} -march=skylake-avx512") +endif() + if (DEFINED TARGET) message(STATUS "Targeting the ${TARGET} architecture.") set(GETARCH_FLAGS "-DFORCE_${TARGET}")