File tree Expand file tree Collapse file tree 2 files changed +615
-2
lines changed Expand file tree Collapse file tree 2 files changed +615
-2
lines changed Original file line number Diff line number Diff line change @@ -1200,8 +1200,13 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
12001200 endif ()
12011201elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64" )
12021202 message (STATUS "PowerPC detected" )
1203- if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le" )
1204- list (APPEND ARCH_FLAGS -mcpu=powerpc64le)
1203+ execute_process (COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1"
1204+ OUTPUT_VARIABLE POWER10_M)
1205+ string (FIND ${POWER10_M} "POWER10" substring_index)
1206+ if (${substring_index} GREATER_EQUAL 0)
1207+ list (APPEND ARCH_FLAGS -mcpu=power10)
1208+ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le" )
1209+ list (APPEND ARCH_FLAGS -mcpu=powerpc64le)
12051210 else ()
12061211 list (APPEND ARCH_FLAGS -mcpu=native -mtune=native)
12071212 #TODO: Add targets for Power8/Power9 (Altivec/VSX) and Power10(MMA) and query for big endian systems (ppc64/le/be)
You can’t perform that action at this time.
0 commit comments