Add -march=skylake-avx512 to CFLAGS when the target is Skylake

Should fix 1806 and #1801
This commit is contained in:
Martin Kroeker
2018-10-10 19:22:01 +02:00
committed by GitHub
parent 8f7e986184
commit fa53b903db

View File

@@ -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}")