File tree Expand file tree Collapse file tree 2 files changed +614
-4
lines changed Expand file tree Collapse file tree 2 files changed +614
-4
lines changed Original file line number Diff line number Diff line change @@ -1259,8 +1259,13 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
12591259 endif ()
12601260elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64" )
12611261 message (STATUS "PowerPC detected" )
1262- if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le" )
1263- list (APPEND ARCH_FLAGS -mcpu=powerpc64le)
1262+ execute_process (COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1"
1263+ OUTPUT_VARIABLE POWER10_M)
1264+ string (FIND ${POWER10_M} "POWER10" substring_index)
1265+ if (${substring_index} GREATER_EQUAL 0)
1266+ list (APPEND ARCH_FLAGS -mcpu=power10)
1267+ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le" )
1268+ list (APPEND ARCH_FLAGS -mcpu=powerpc64le)
12641269 else ()
12651270 list (APPEND ARCH_FLAGS -mcpu=native -mtune=native)
12661271 #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