Skip to content

Commit 56ebc7b

Browse files
authored
Merge pull request #1808 from martin-frbg/issue1806
Add -march=skylake-avx512 to CFLAGS when the target is Skylake
2 parents c5f88f5 + 8a11ec1 commit 56ebc7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/system.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ if (DEFINED BINARY AND DEFINED TARGET AND BINARY EQUAL 32)
4141
endif ()
4242
endif ()
4343

44+
if (DEFINED TARGET)
45+
if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)
46+
set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
47+
set (FCOMMON_OPT "${FCOMMON_OPT} -march=skylake-avx512")
48+
endif()
49+
endif()
50+
4451
if (DEFINED TARGET)
4552
message(STATUS "Targeting the ${TARGET} architecture.")
4653
set(GETARCH_FLAGS "-DFORCE_${TARGET}")

0 commit comments

Comments
 (0)