File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1265,10 +1265,13 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
12651265 endif ()
12661266elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64" )
12671267 message (STATUS "PowerPC detected" )
1268- execute_process (COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1"
1269- OUTPUT_VARIABLE POWER10_M)
1270- string (FIND ${POWER10_M} "POWER10" substring_index)
1271- if (${substring_index} GREATER_EQUAL 0)
1268+ execute_process (COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1" OUTPUT_VARIABLE POWER10_M)
1269+ string (FIND "${POWER10_M} " "POWER10" substring_index)
1270+ if (NOT DEFINED substring_index OR "${substring_index} " STREQUAL "" )
1271+ set (substring_index -1)
1272+ endif ()
1273+
1274+ if (${substring_index} GREATER_EQUAL 0)
12721275 list (APPEND ARCH_FLAGS -mcpu=power10)
12731276 elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le" )
12741277 list (APPEND ARCH_FLAGS -mcpu=powerpc64le)
You can’t perform that action at this time.
0 commit comments