File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,29 @@ if (DEFINED TARGET)
280
280
if (${TARGET} STREQUAL POWER8)
281
281
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math" )
282
282
endif ()
283
+
284
+ if (${TARGET} STREQUAL NEOVERSEV1)
285
+ execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
286
+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
287
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve -mtune=neoverse-v1" )
288
+ else ()
289
+ message (FATAL_ERROR "Compiler ${CMAKE_C_COMPILER} ${GCC_VERSION} does not support Neoverse V1." )
290
+ endif ()
291
+ endif ()
292
+ if (${TARGET} STREQUAL NEOVERSEN2)
293
+ execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
294
+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
295
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2" )
296
+ else ()
297
+ message (FATAL_ERROR "Compiler $${CMAKE_C_COMPILER} {GCC_VERSION} does not support Neoverse N2." )
298
+ endif ()
299
+ endif ()
300
+ if (${TARGET} STREQUAL ARMV8SVE)
301
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve" )
302
+ endif ()
303
+
283
304
endif ()
305
+
284
306
if (DEFINED BINARY)
285
307
message (STATUS "Compiling a ${BINARY} -bit binary." )
286
308
endif ()
You can’t perform that action at this time.
0 commit comments