Skip to content

Commit fa53b90

Browse files
authored
Add -march=skylake-avx512 to CFLAGS when the target is Skylake
Should fix 1806 and #1801
1 parent 8f7e986 commit fa53b90

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/system.cmake

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

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

0 commit comments

Comments
 (0)