summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-03-09 21:21:10 (GMT)
committerBrad King <brad.king@kitware.com>2011-03-15 19:07:31 (GMT)
commit4dd2ec2cb9dec683eafd3b303e04418c694675a3 (patch)
tree014e56543c1620ff0679e4601251494ba17f8cf1
parent6dd74d5a593e422dcc588ad8bc37382e06e8b256 (diff)
downloadCMake-4dd2ec2cb9dec683eafd3b303e04418c694675a3.zip
CMake-4dd2ec2cb9dec683eafd3b303e04418c694675a3.tar.gz
CMake-4dd2ec2cb9dec683eafd3b303e04418c694675a3.tar.bz2
ProcessorCount: Test fails if count is 0 (#11302)
It also fails if count is not a decimal integer.
-rw-r--r--Tests/CMakeTests/ProcessorCountTest.cmake.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/Tests/CMakeTests/ProcessorCountTest.cmake.in b/Tests/CMakeTests/ProcessorCountTest.cmake.in
index c653628..c5feb31 100644
--- a/Tests/CMakeTests/ProcessorCountTest.cmake.in
+++ b/Tests/CMakeTests/ProcessorCountTest.cmake.in
@@ -25,9 +25,11 @@ message("")
# Evaluate possible error conditions:
#
set(err 0)
+set(fatal 0)
if(processor_count EQUAL 0)
set(err 1)
+ set(fatal 1)
message("err 1")
message("could not determine number of processors
- Additional code for this platform needed in ProcessorCount.cmake?")
@@ -45,6 +47,7 @@ endif()
if(NOT processor_count MATCHES "^[0-9]+$")
set(err 3)
+ set(fatal 1)
message("err 3")
message("ProcessorCount function returned a non-integer")
message("")
@@ -57,8 +60,6 @@ if(NOT system_info_processor_count MATCHES "^[0-9]+$")
message("")
endif()
-# TODO: Make this test fail again, once all the dev work is done...
-#
-if(err)
-# message(FATAL_ERROR "err='${err}'")
+if(fatal)
+ message(FATAL_ERROR "processor_count='${processor_count}' - see previous test output for more details - it is likely more/different code is needed in ProcessorCount.cmake to fix this test failure - processor_count should be a non-zero positive integer (>=1) for all supported CMake platforms")
endif()