[Cmake-commits] CMake branch, next, updated. v2.8.3-565-g70243a4

David Cole david.cole at kitware.com
Tue Nov 9 14:35:12 EST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  70243a4a00785ac8ed4b4a2470416cefa21ba89e (commit)
       via  248b1beb8b975e7980c7c553eb249d27d31bcc75 (commit)
      from  cc0b80a4522d02572c88c18e59ae5ceb190db00e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70243a4a00785ac8ed4b4a2470416cefa21ba89e
commit 70243a4a00785ac8ed4b4a2470416cefa21ba89e
Merge: cc0b80a 248b1be
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Tue Nov 9 14:35:10 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 9 14:35:10 2010 -0500

    Merge topic 'add-ProcessorCount-module' into next
    
    248b1be Compare ProcessorCount to SystemInformation count. (#11302)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=248b1beb8b975e7980c7c553eb249d27d31bcc75
commit 248b1beb8b975e7980c7c553eb249d27d31bcc75
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Tue Nov 9 14:29:52 2010 -0500
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Tue Nov 9 14:32:08 2010 -0500

    Compare ProcessorCount to SystemInformation count. (#11302)
    
    Maximize output to gather data on the dashboards.
    Only FATAL_ERROR out once at the bottom if an error
    occurred earlier.

diff --git a/Tests/CMakeTests/ProcessorCountTest.cmake.in b/Tests/CMakeTests/ProcessorCountTest.cmake.in
index ac7a1da..6550973 100644
--- a/Tests/CMakeTests/ProcessorCountTest.cmake.in
+++ b/Tests/CMakeTests/ProcessorCountTest.cmake.in
@@ -3,11 +3,45 @@ include(ProcessorCount)
 ProcessorCount(processor_count)
 message("processor_count='${processor_count}'")
 
-if(NOT processor_count MATCHES "^[0-9]+$")
-  message(FATAL_ERROR "ProcessorCount function returned a non-integer")
+execute_process(
+  COMMAND "@CMAKE_BINARY_DIR@/Source/kwsys/$ENV{CMAKE_CONFIG_TYPE}/cmsysTestsCxx"
+  testSystemInformation
+  OUTPUT_VARIABLE out)
+string(REGEX REPLACE "(.*)GetNumberOfPhysicalCPU:.([0-9]*)(.*)" "\\2"
+  system_info_processor_count "${out}")
+message("system_info_processor_count='${system_info_processor_count}'")
+
+if(system_info_processor_count EQUAL processor_count)
+  message("processor count matches system information")
 endif()
 
+# Evaluate possible error conditions:
+#
+set(err 0)
+
 if(processor_count EQUAL 0)
-  message(FATAL_ERROR "could not determine number of processors
+  set(err 1)
+  message("could not determine number of processors
 - Additional code for this platform needed in ProcessorCount.cmake?")
 endif()
+
+if(NOT system_info_processor_count EQUAL processor_count)
+  set(err 2)
+  message("SystemInformation and ProcessorCount.cmake disagree:\n"
+    "processor_count='${processor_count}'\n"
+    "SystemInformation processor_count='${system_info_processor_count}'")
+endif()
+
+if(NOT processor_count MATCHES "^[0-9]+$")
+  set(err 3)
+  message("ProcessorCount function returned a non-integer")
+endif()
+
+if(NOT system_info_processor_count MATCHES "^[0-9]+$")
+  set(err 4)
+  message("SystemInformation ProcessorCount function returned a non-integer")
+endif()
+
+if(err)
+  message(FATAL_ERROR "err='${err}'")
+endif()

-----------------------------------------------------------------------

Summary of changes:
 Tests/CMakeTests/ProcessorCountTest.cmake.in |   40 ++++++++++++++++++++++++--
 1 files changed, 37 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list