Skip to content

Commit a9b51b8

Browse files
authored
Merge pull request #1798 from martin-frbg/cmake-avx512
Add -march=skylake-avx512 when required
2 parents 6e2c494 + eba394c commit a9b51b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/system_check.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ if (X86_64 OR X86)
7171
execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -v -o ${PROJECT_BINARY_DIR}/avx512.o -x c ${PROJECT_BINARY_DIR}/avx512.tmp OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
7272
if (NO_AVX512 EQUAL 1)
7373
set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
74+
else()
75+
set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512")
7476
endif()
7577
file(REMOVE "avx512.tmp" "avx512.o")
7678
endif()

0 commit comments

Comments
 (0)