Commit 2ad09c5d authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'ProcessorCount-solaris'

1c87bc60 ProcessorCount: Fix virtual processor count on Solaris
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3694
parents e15a9187 1c87bc60
Pipeline #144384 passed with stage
in 0 seconds
......@@ -168,9 +168,13 @@ function(ProcessorCount var)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE psrinfo_output)
string(REGEX MATCH "([0-9]+) virtual processor" procs "${psrinfo_output}")
set(count "${CMAKE_MATCH_1}")
#message("ProcessorCount: trying psrinfo -p -v '${ProcessorCount_cmd_prvinfo}'")
string(REGEX MATCHALL "has [0-9]+ virtual processor" procs "${psrinfo_output}")
set(count "")
foreach(proc ${procs})
string(REGEX MATCH "has ([0-9]+) virtual" res ${proc})
math(EXPR count "${count} + ${CMAKE_MATCH_1}")
endforeach()
#message("ProcessorCount: trying '${ProcessorCount_cmd_psrinfo}' -p -v")
else()
# Sun (systems where uname -X emits "NumCPU" in its output):
find_program(ProcessorCount_cmd_uname uname)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment