summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/CMakeLists.txt1
-rw-r--r--Tests/CMakeTests/ProcessorCountTest.cmake.in9
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index cceef3b..5cb50c9 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -27,6 +27,7 @@ AddCMakeTest(String "")
AddCMakeTest(Math "")
AddCMakeTest(CMakeMinimumRequired "")
AddCMakeTest(CompilerIdVendor "")
+AddCMakeTest(ProcessorCount "")
AddCMakeTest(FileDownload "")
set_property(TEST CMake.FileDownload PROPERTY
diff --git a/Tests/CMakeTests/ProcessorCountTest.cmake.in b/Tests/CMakeTests/ProcessorCountTest.cmake.in
new file mode 100644
index 0000000..0815fd8
--- /dev/null
+++ b/Tests/CMakeTests/ProcessorCountTest.cmake.in
@@ -0,0 +1,9 @@
+include(ProcessorCount)
+
+ProcessorCount(processor_count)
+message("processor_count='${processor_count}'")
+
+if(processor_count EQUAL 0)
+ message(FATAL_ERROR "could not determine number of processors
+- Additional code needed in ProcessorCount.cmake?")
+endif()