Merge pull request #1808 from martin-frbg/issue1806

Add -march=skylake-avx512 to CFLAGS when the target is Skylake
This commit is contained in:
Martin Kroeker 2018-10-11 07:48:08 +02:00 committed by GitHub
commit 56ebc7b53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -41,6 +41,13 @@ if (DEFINED BINARY AND DEFINED TARGET AND BINARY EQUAL 32)
endif ()
endif ()
if (DEFINED TARGET)
if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
set (FCOMMON_OPT "${FCOMMON_OPT} -march=skylake-avx512")
endif()
endif()
if (DEFINED TARGET)
message(STATUS "Targeting the ${TARGET} architecture.")
set(GETARCH_FLAGS "-DFORCE_${TARGET}")