From 4d0e2e81e9c60f6f147f3b332b1d885d543b2084 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Wed, 23 Jan 2013 20:23:18 +0100 Subject: [PATCH] ProcessorCount test: require SystemInformation process to work Currently this silently fails on some systems. Make sure those things get noticed so we can fix that. --- Tests/CMakeTests/ProcessorCountTest.cmake.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Tests/CMakeTests/ProcessorCountTest.cmake.in b/Tests/CMakeTests/ProcessorCountTest.cmake.in index 15e021948..f92dcc44c 100644 --- a/Tests/CMakeTests/ProcessorCountTest.cmake.in +++ b/Tests/CMakeTests/ProcessorCountTest.cmake.in @@ -12,7 +12,14 @@ execute_process( COMMAND "${KWSYS_TEST_EXE}" testSystemInformation OUTPUT_VARIABLE tsi_out - ERROR_VARIABLE tsi_err) + ERROR_VARIABLE tsi_err + RESULT_VARIABLE tsi_res +) +if (tsi_res) + message("executing \"${KWSYS_TEST_EXE}\" failed") + message(FATAL_ERROR "output: ${tsi_res}") +endif () + string(REGEX REPLACE "(.*)GetNumberOfPhysicalCPU:.([0-9]*)(.*)" "\\2" system_info_processor_count "${tsi_out}")