File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,14 @@ endif ()
46
46
47
47
if (DEFINED TARGET )
48
48
if (${TARGET} STREQUAL "COOPERLAKE" AND NOT NO_AVX512 )
49
- set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake" )
49
+ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" )
50
+ execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION )
51
+ if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL10.1 )
52
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake" )
53
+ else ()
54
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512" )
55
+ endif ()
56
+ endif ()
50
57
endif ()
51
58
if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512 )
52
59
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512" )
You can’t perform that action at this time.
0 commit comments