diff options
author | Brad King <brad.king@kitware.com> | 2014-04-01 15:06:11 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-01 15:06:11 (GMT) |
commit | 8617de566f637935793dc2c7bcf004a3b311c31e (patch) | |
tree | 89d96ca6258ed477e3146549af86c18709122d3b | |
parent | 05d3570cf586e9548ec5b01925a9c869076024eb (diff) | |
parent | c3e238dd538322268a4475ac4454b35fe39a134e (diff) | |
download | CMake-8617de566f637935793dc2c7bcf004a3b311c31e.zip CMake-8617de566f637935793dc2c7bcf004a3b311c31e.tar.gz CMake-8617de566f637935793dc2c7bcf004a3b311c31e.tar.bz2 |
Merge topic 'hpux-processorcount'
c3e238dd ProcessorCount: use mpsched on HPUX if machinfo is not present
-rw-r--r-- | Modules/ProcessorCount.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/ProcessorCount.cmake b/Modules/ProcessorCount.cmake index 0fe0b32..e034a28 100644 --- a/Modules/ProcessorCount.cmake +++ b/Modules/ProcessorCount.cmake @@ -104,6 +104,18 @@ function(ProcessorCount var) string(REGEX MATCHALL "Number of CPUs = ([0-9]+)" procs "${machinfo_output}") set(count "${CMAKE_MATCH_1}") #message("ProcessorCount: trying machinfo '${ProcessorCount_cmd_machinfo}'") + else() + find_program(ProcessorCount_cmd_mpsched mpsched) + mark_as_advanced(ProcessorCount_cmd_mpsched) + if(ProcessorCount_cmd_mpsched) + execute_process(COMMAND ${ProcessorCount_cmd_mpsched} -s + OUTPUT_QUIET + ERROR_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE mpsched_output) + string(REGEX MATCHALL "Processor Count *: *([0-9]+)" procs "${mpsched_output}") + set(count "${CMAKE_MATCH_1}") + #message("ProcessorCount: trying mpsched -s '${ProcessorCount_cmd_mpsched}'") + endif() endif() endif() |