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, master has been updated
       via  b104bcfd98add349f7624887073c79a84ae41c44 (commit)
       via  62d736f74ad2eaa737d37ba0b30c8a137782537b (commit)
       via  6a54dbe8caeaaa78a8ac78b282d80128f0201f9a (commit)
       via  bccd442f7183de1da8e97cfd4a4be2d3b21a807c (commit)
       via  73db89c2c2d997f6e1992dd1eab05e54792bd164 (commit)
       via  2dabcebf3ce1b331c723055322b3fbe2e8ab482d (commit)
       via  4c626b7e43c27de0dce4b8af15290cce861f9dc8 (commit)
       via  4bd5af6302f0b7bafecf9ca7919287fe4d3f09e0 (commit)
       via  0ce082b7c823c0f88fbb329ca05d69a8f60f3851 (commit)
       via  36346de4809bf443ca9ca8daea2bdc1af7874b68 (commit)
       via  bbc9c96691c06cdcff0227ad8292e2a2ea60ec00 (commit)
       via  701a637e4d0294ad76df7c11244c9b9b2e84716d (commit)
       via  777e87ae00e8920bd6bf971fb40a07e373061500 (commit)
       via  3048777006e1d10646e7b62f46406859dc4d0812 (commit)
       via  5464e23ff5e822b8a99a3cd234c54ff4632ccb98 (commit)
       via  f61052ad390773610e14367c14fb53ad2e6b789e (commit)
       via  39c2feaf8c4dcb9c3a30c68a066fb70e126d7fe6 (commit)
       via  f5d2988ea7cc60778dbaa21860aad264c7aa7a81 (commit)
       via  2636d86ce2f45f06bdcf4cb60c15df55838a3aa7 (commit)
       via  d46b4ba83532d8954e473a26112288cd8e693775 (commit)
       via  08dca58358c95a41615150513a006379c4ee7825 (commit)
      from  3d6e45af611983d85b130b4f874d862f7d998013 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b104bcfd98add349f7624887073c79a84ae41c44
commit b104bcfd98add349f7624887073c79a84ae41c44
Merge: 62d736f 777e87a
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 6 14:01:52 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Nov 6 09:02:23 2017 -0500

    Merge topic 'typos'
    
    777e87ae Fix trivial typos in text
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1442


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62d736f74ad2eaa737d37ba0b30c8a137782537b
commit 62d736f74ad2eaa737d37ba0b30c8a137782537b
Merge: 6a54dbe 4c626b7
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 6 13:58:04 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Nov 6 09:01:49 2017 -0500

    Merge topic 'test-contract-refactor'
    
    4c626b7e Tests: Refactor contract test activation
    4bd5af63 Tests: Factor out contract test HOME finding
    0ce082b7 Tests: Drop unused contract test environment script
    36346de4 Tests: Drop unused contract test
    bbc9c966 Tests: Honor already-set CTEST_REAL_HOME in case of repeat run
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1444


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a54dbe8caeaaa78a8ac78b282d80128f0201f9a
commit 6a54dbe8caeaaa78a8ac78b282d80128f0201f9a
Merge: bccd442 701a637
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 6 13:55:19 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Nov 6 09:00:44 2017 -0500

    Merge topic 'test-crash-ubsan'
    
    701a637e Tests: Fix CTestTestCrash test under ubsan
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1443


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bccd442f7183de1da8e97cfd4a4be2d3b21a807c
commit bccd442f7183de1da8e97cfd4a4be2d3b21a807c
Merge: 73db89c f61052a
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 6 13:54:58 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Nov 6 08:59:36 2017 -0500

    Merge topic 'bzip2-windows'
    
    f61052ad FindBZip2: Normalize slashes when legacy BZIP2_LIBRARIES is 
specified
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1439


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73db89c2c2d997f6e1992dd1eab05e54792bd164
commit 73db89c2c2d997f6e1992dd1eab05e54792bd164
Merge: 2dabceb 39c2fea
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 6 13:56:33 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Nov 6 08:58:11 2017 -0500

    Merge topic 'server-refactor'
    
    39c2feaf misc: Added utility method to allow working with stacks
    f5d2988e server: Swapped to cm_thread impl
    2636d86c utility: Added minimal std::thread drop-in
    d46b4ba8 server: Updated server tests to try various communication channels
    08dca583 Tests: reworked server tests to allow other operation modes
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1230


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dabcebf3ce1b331c723055322b3fbe2e8ab482d
commit 2dabcebf3ce1b331c723055322b3fbe2e8ab482d
Merge: 3d6e45a 3048777
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 6 13:54:39 2017 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Nov 6 08:55:35 2017 -0500

    Merge topic 'update-kwsys'
    
    30487770 Merge branch 'upstream-KWSys' into update-kwsys
    5464e23f KWSys 2017-11-02 (54f0901a)
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1440


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c626b7e43c27de0dce4b8af15290cce861f9dc8
commit 4c626b7e43c27de0dce4b8af15290cce861f9dc8
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Oct 30 10:48:05 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Nov 3 11:35:06 2017 -0400

    Tests: Refactor contract test activation
    
    Use separate `CMake_TEST_CONTRACT_<project>` variables for each test.
    Make the set of possible tests match what is in the source tree.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index bd44b17..5a149c8 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -3388,31 +3388,30 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P 
${CMake_SOURCE_DIR}/Utilities/Release
   set_property(TEST CMakeWizardTest PROPERTY PASS_REGULAR_EXPRESSION
     "The \"cmake -i\" wizard mode is no longer supported.")
 
-  # If the cache variable CMAKE_CONTRACT_PROJECTS is set
-  # then the dashboard will run a contract with CMake test of that
-  # name.  For example CMAKE_CONTRACT_PROJECTS = vtk542 would run
-  # the vtk542 contract test.
-  # For each Contract test, the project should provide a directory
-  # with at least one CMakeLists.txt file that uses ExternalProject
-  # to download and configure the project. The directory should also
-  # contain a RunTest.cmake file that has a single set of the format:
-  # set(project_RUN_TEST testToRun)
-  # The testToRun should be a test executable that can be run to
-  # smoke test the build.
-  foreach(project ${CMAKE_CONTRACT_PROJECTS})
-    include(Contracts/${project}/RunTest.cmake)
-    ADD_TEST_MACRO(Contracts.${project}
-      ${${project}_RUN_TEST})
-    # Contract test timeout in seconds.
-    # Default to 6 hours.
-    if(DEFINED ${project}_TEST_TIMEOUT)
-      set(timeout ${${project}_TEST_TIMEOUT})
-    elseif(CMAKE_CONTRACT_TEST_TIMEOUT_DEFAULT)
-      set(timeout ${CMAKE_CONTRACT_TEST_TIMEOUT_DEFAULT})
-    else()
-      set(timeout 21600)
+  # Define a set of "contract" tests, each activated by a cache entry
+  # named "CMake_TEST_CONTRACT_<project>".  For each Contract test,
+  # the project should provide a directory with a CMakeLists.txt file
+  # that uses ExternalProject to download and configure the project.
+  # The directory should also contain a Configure.cmake file that
+  # sets "CMake_TEST_CONTRACT_<project>_<var>" variables to configure
+  # the code below.
+  foreach(project
+      Trilinos
+      VTK
+      )
+    if(CMake_TEST_CONTRACT_${project})
+      include(Contracts/${project}/Configure.cmake)
+      ADD_TEST_MACRO(Contracts.${project} 
${CMake_TEST_CONTRACT_${project}_RUN_TEST})
+      # The external projects may take a long time to build.
+      if(DEFINED CMake_TEST_CONTRACT_${project}_TIMEOUT)
+        set(timeout ${CMake_TEST_CONTRACT_${project}_TIMEOUT})
+      elseif(CMake_TEST_CONTRACT_DEFAULT_TIMEOUT)
+        set(timeout ${CMake_TEST_CONTRACT_DEFAULT_TIMEOUT})
+      else()
+        set(timeout 21600)
+      endif()
+      set_property(TEST Contracts.${project} PROPERTY TIMEOUT "${timeout}")
     endif()
-    set_tests_properties(Contracts.${project} PROPERTIES TIMEOUT ${timeout})
   endforeach()
 
   if(TEST_CompileCommandOutput)
diff --git a/Tests/Contracts/Trilinos/RunTest.cmake 
b/Tests/Contracts/Trilinos/Configure.cmake
similarity index 78%
rename from Tests/Contracts/Trilinos/RunTest.cmake
rename to Tests/Contracts/Trilinos/Configure.cmake
index d661a4c..d62eb79 100644
--- a/Tests/Contracts/Trilinos/RunTest.cmake
+++ b/Tests/Contracts/Trilinos/Configure.cmake
@@ -4,4 +4,4 @@ set(dir "${CMAKE_CURRENT_BINARY_DIR}/Contracts/${project}")
 set(exe "${CMAKE_COMMAND}")
 set(args -P "${dir}/ValidateBuild.cmake")
 
-set(Trilinos_RUN_TEST ${exe} ${args})
+set(CMake_TEST_CONTRACT_Trilinos_RUN_TEST ${exe} ${args})
diff --git a/Tests/Contracts/VTK/RunTest.cmake 
b/Tests/Contracts/VTK/Configure.cmake
similarity index 65%
rename from Tests/Contracts/VTK/RunTest.cmake
rename to Tests/Contracts/VTK/Configure.cmake
index 65285cf..037d75a 100644
--- a/Tests/Contracts/VTK/RunTest.cmake
+++ b/Tests/Contracts/VTK/Configure.cmake
@@ -1,3 +1,3 @@
 set(exe "$ENV{HOME}/.cmake/Contracts/VTK/VTK-build/bin/vtkCommonCoreCxxTests")
 set(args otherArrays)
-set(VTK_RUN_TEST ${exe} ${args})
+set(CMake_TEST_CONTRACT_VTK_RUN_TEST ${exe} ${args})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bd5af6302f0b7bafecf9ca7919287fe4d3f09e0
commit 4bd5af6302f0b7bafecf9ca7919287fe4d3f09e0
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Oct 26 15:43:29 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Nov 3 11:35:06 2017 -0400

    Tests: Factor out contract test HOME finding

diff --git a/Tests/Contracts/Home.cmake b/Tests/Contracts/Home.cmake
new file mode 100644
index 0000000..8b05e81
--- /dev/null
+++ b/Tests/Contracts/Home.cmake
@@ -0,0 +1,19 @@
+# Find a home in which to build.
+if(NOT DEFINED HOME)
+  if(DEFINED ENV{CTEST_REAL_HOME})
+    set(HOME "$ENV{CTEST_REAL_HOME}")
+  else()
+    set(HOME "$ENV{HOME}")
+  endif()
+
+  if(NOT HOME AND WIN32)
+    # Try for USERPROFILE as HOME equivalent:
+    string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}")
+
+    # But just use root of SystemDrive if USERPROFILE contains any spaces:
+    # (Default on XP and earlier...)
+    if(HOME MATCHES " ")
+      string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}")
+    endif()
+  endif()
+endif()
diff --git a/Tests/Contracts/Trilinos/CMakeLists.txt 
b/Tests/Contracts/Trilinos/CMakeLists.txt
index 8d74ca5..4d7062b 100644
--- a/Tests/Contracts/Trilinos/CMakeLists.txt
+++ b/Tests/Contracts/Trilinos/CMakeLists.txt
@@ -6,24 +6,7 @@ include(ExternalProject)
 include("${CMAKE_CURRENT_SOURCE_DIR}/LocalOverrides.cmake" OPTIONAL)
 include("${CMAKE_CURRENT_BINARY_DIR}/LocalOverrides.cmake" OPTIONAL)
 
-if(NOT DEFINED HOME)
-  if(DEFINED ENV{CTEST_REAL_HOME})
-    set(HOME "$ENV{CTEST_REAL_HOME}")
-  else()
-    set(HOME "$ENV{HOME}")
-  endif()
-
-  if(NOT HOME AND WIN32)
-    # Try for USERPROFILE as HOME equivalent:
-    string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}")
-
-    # But just use root of SystemDrive if USERPROFILE contains any spaces:
-    # (Default on XP and earlier...)
-    if(HOME MATCHES " ")
-      string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}")
-    endif()
-  endif()
-endif()
+include(${CMAKE_CURRENT_SOURCE_DIR}/../Home.cmake)
 message(STATUS "HOME='${HOME}'")
 
 if(NOT DEFINED url)
diff --git a/Tests/Contracts/VTK/CMakeLists.txt 
b/Tests/Contracts/VTK/CMakeLists.txt
index ef19325..c946499 100644
--- a/Tests/Contracts/VTK/CMakeLists.txt
+++ b/Tests/Contracts/VTK/CMakeLists.txt
@@ -5,24 +5,7 @@ project(VTK)
 include(ExternalProject)
 
 # find "HOME".  VTK will be downloaded & built within a subdirectory.
-if(NOT DEFINED HOME)
-  if(DEFINED ENV{CTEST_REAL_HOME})
-    set(HOME "$ENV{CTEST_REAL_HOME}")
-  else()
-    set(HOME "$ENV{HOME}")
-  endif()
-
-  if(NOT HOME AND WIN32)
-    # Try for USERPROFILE as HOME equivalent:
-    string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}")
-
-    # But just use root of SystemDrive if USERPROFILE contains any spaces:
-    # (Default on XP and earlier...)
-    if(HOME MATCHES " ")
-      string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}")
-    endif()
-  endif()
-endif()
+include(${CMAKE_CURRENT_SOURCE_DIR}/../Home.cmake)
 
 set(base_dir "${HOME}/.cmake/Contracts/VTK")
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ce082b7c823c0f88fbb329ca05d69a8f60f3851
commit 0ce082b7c823c0f88fbb329ca05d69a8f60f3851
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Oct 30 11:41:57 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Nov 3 11:32:06 2017 -0400

    Tests: Drop unused contract test environment script
    
    `Trilinos/EnvScript.cmake` has machine-specific content that has been
    moved to the respective machines.

diff --git a/Tests/Contracts/Trilinos/EnvScript.cmake 
b/Tests/Contracts/Trilinos/EnvScript.cmake
deleted file mode 100644
index dacb704..0000000
--- a/Tests/Contracts/Trilinos/EnvScript.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-# Site specific settings:
-#
-if(CTEST_SITE MATCHES "faraway")
-  set(CTEST_SITE "faraway.kitware")
-  set(ENV{CTEST_SITE} "${CTEST_SITE}")
-endif()
-
-if(CTEST_SITE STREQUAL "HUT11")
-  set(CTEST_SITE "hut11.kitware")
-  set(ENV{CTEST_SITE} "${CTEST_SITE}")
-
-  set(ENV{CLAPACK_DIR} "C:/T/clapack/b/clapack-prefix/src/clapack-build")
-endif()
-
-if(CTEST_SITE MATCHES "qwghlm")
-  set(CTEST_SITE "qwghlm.kitware")
-  set(ENV{CTEST_SITE} "${CTEST_SITE}")
-
-  set(ENV{PATH} "/opt/local/bin:$ENV{PATH}")
-  set(ENV{CC} "gcc-mp-4.3")
-  set(ENV{CXX} "g++-mp-4.3")
-  set(ENV{FC} "gfortran-mp-4.3")
-endif()
-
-# Submit to alternate CDash server:
-#
-#set(ENV{CTEST_DROP_SITE} "localhost")
-#set(ENV{CTEST_DROP_LOCATION} "/CDash/submit.php?project=Trilinos")
-
-# Limit packages built:
-#
-set(ENV{Trilinos_PACKAGES} "Teuchos;Kokkos")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36346de4809bf443ca9ca8daea2bdc1af7874b68
commit 36346de4809bf443ca9ca8daea2bdc1af7874b68
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Oct 30 10:32:52 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Nov 3 11:30:26 2017 -0400

    Tests: Drop unused contract test

diff --git a/Tests/Contracts/cse-snapshot/CMakeLists.txt 
b/Tests/Contracts/cse-snapshot/CMakeLists.txt
deleted file mode 100644
index 9134210..0000000
--- a/Tests/Contracts/cse-snapshot/CMakeLists.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-project(cse-snapshot)
-
-include(ExternalProject)
-
-include("${CMAKE_CURRENT_SOURCE_DIR}/LocalOverrides.cmake" OPTIONAL)
-include("${CMAKE_CURRENT_BINARY_DIR}/LocalOverrides.cmake" OPTIONAL)
-
-if(NOT DEFINED HOME)
-  if(DEFINED ENV{CTEST_REAL_HOME})
-    set(HOME "$ENV{CTEST_REAL_HOME}")
-  else()
-    set(HOME "$ENV{HOME}")
-  endif()
-endif()
-message(STATUS "HOME='${HOME}'")
-
-if(NOT DEFINED repo)
-  set(repo "git://public.kitware.com/cse.git")
-endif()
-message(STATUS "repo='${repo}'")
-
-if(NOT DEFINED tag)
-  set(tag "cc1dcb95439a21ab1d58f444d93481598414196e")
-endif()
-message(STATUS "tag='${tag}'")
-
-string(SUBSTRING "${tag}" 0 8 shorttag)
-
-set(base_dir "${HOME}/.cmake/Contracts/${PROJECT_NAME}/${shorttag}")
-set(binary_dir "${base_dir}/build")
-set(script_dir "${base_dir}")
-set(source_dir "${base_dir}/src")
-
-if(NOT DEFINED BUILDNAME)
-  set(BUILDNAME "CMakeContract-${shorttag}")
-endif()
-message(STATUS "BUILDNAME='${BUILDNAME}'")
-
-if(NOT DEFINED SITE)
-  site_name(SITE)
-endif()
-message(STATUS "SITE='${SITE}'")
-
-if(NOT DEFINED PROCESSOR_COUNT)
-  # Unknown:
-  set(PROCESSOR_COUNT 0)
-
-  # Linux:
-  set(cpuinfo_file "/proc/cpuinfo")
-  if(EXISTS "${cpuinfo_file}")
-    file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
-    list(LENGTH procs PROCESSOR_COUNT)
-  endif()
-
-  # Mac:
-  if(APPLE)
-    find_program(cmd_sysctl "sysctl")
-    if(cmd_sysctl)
-      execute_process(COMMAND ${cmd_sysctl} -n hw.ncpu
-        OUTPUT_VARIABLE PROCESSOR_COUNT
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-    endif()
-  endif()
-
-  # Windows:
-  if(WIN32)
-    set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}")
-  endif()
-endif()
-message(STATUS "PROCESSOR_COUNT='${PROCESSOR_COUNT}'")
-
-find_package(Git)
-if(NOT GIT_EXECUTABLE)
-  message(FATAL_ERROR "error: could not find git")
-  # adjust PATH to find git, or set GIT_EXECUTABLE in LocalOverrides.cmake
-endif()
-message(STATUS "GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
-
-configure_file(
-  "${CMAKE_CURRENT_SOURCE_DIR}/Dashboard.cmake.in"
-  "${script_dir}/Dashboard.cmake"
-  @ONLY)
-
-# Source dir for this project exists outside the CMake build tree because it
-# is absolutely huge.
-#
-if(EXISTS "${source_dir}/.git")
-  # If it exists already, download is a complete no-op:
-  ExternalProject_Add(download-${PROJECT_NAME}
-    DOWNLOAD_COMMAND ""
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND ""
-    INSTALL_COMMAND ""
-  )
-else()
-  # If it does not yet exist, download clones the git repository:
-  ExternalProject_Add(download-${PROJECT_NAME}
-    SOURCE_DIR "${source_dir}"
-    GIT_REPOSITORY "${repo}"
-    GIT_TAG "${tag}"
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND ""
-    INSTALL_COMMAND ""
-  )
-endif()
-
-ExternalProject_Add(build-${PROJECT_NAME}
-  DOWNLOAD_COMMAND ""
-  CONFIGURE_COMMAND ""
-  BUILD_COMMAND ${CMAKE_CTEST_COMMAND} -S "${script_dir}/Dashboard.cmake"
-  INSTALL_COMMAND ""
-  DEPENDS download-${PROJECT_NAME}
-  )
diff --git a/Tests/Contracts/cse-snapshot/Dashboard.cmake.in 
b/Tests/Contracts/cse-snapshot/Dashboard.cmake.in
deleted file mode 100644
index 138eb3f..0000000
--- a/Tests/Contracts/cse-snapshot/Dashboard.cmake.in
+++ /dev/null
@@ -1,76 +0,0 @@
-# This "ctest -S" script may be configured to drive a nightly dashboard on any
-# Linux machine.
-#
-set(CTEST_BINARY_DIRECTORY "@binary_dir@")
-set(CTEST_BUILD_NAME "@BUILDNAME@")
-set(CTEST_SITE "@SITE@")
-set(CTEST_SOURCE_DIRECTORY "@source_dir@")
-set(PROCESSOR_COUNT "@PROCESSOR_COUNT@")
-
-# Assume a Linux build, with a make that supports -j. Modify this script if
-# assumption is ever invalid.
-#
-if(PROCESSOR_COUNT)
-  set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
-endif()
-
-set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
-set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
-
-message("Cleaning binary dir '${CTEST_BINARY_DIRECTORY}'")
-ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
-
-# Intentionally no ctest_update step in this script. This script is run as a
-# "Contract" test on a CMake dashboard submission using the just-built ctest
-# as the driver. The download step in the Contract CMakeLists file takes care
-# of setting up the source tree before calling this ctest -S script. The idea
-# is that the source tree will be the same every day, so there should not be
-# an "update" step for this build.
-
-message("Configuring CSE in binary dir '${CTEST_BINARY_DIRECTORY}'")
-set_property(GLOBAL PROPERTY SubProject "CSE-toplevel")
-set_property(GLOBAL PROPERTY Label "CSE-toplevel")
-
-ctest_start("Experimental")
-
-set(CSE_TOPLEVEL_OPTIONS
-  -DEXTERNAL_PROJECT_DASHBOARD_BUILD:BOOL=ON
-  -DEXTERNAL_PROJECT_TESTS:BOOL=ON
-  -DCSE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY}/built
-  -DCSE_SUBSET:STRING=ALL
-  -DCTEST_SITE:STRING=${CTEST_SITE}
-)
-
-ctest_configure(OPTIONS "${CSE_TOPLEVEL_OPTIONS}")
-
-# The configure step produces a file listing the CSE packages and dependencies.
-# This file also generates Project.xml and stores it in ${PROJECT_XML}.
-#
-set(subprojects "")
-if(EXISTS "${CTEST_BINARY_DIRECTORY}/CSEBuildtimeDepends.cmake")
-  message("Including CSEBuildtimeDepends.cmake")
-  include("${CTEST_BINARY_DIRECTORY}/CSEBuildtimeDepends.cmake")
-  set(subprojects ${CSE_ALL_SORTED})
-  message("Submitting Project.xml")
-  ctest_submit(FILES ${PROJECT_XML})
-endif()
-
-message("Submitting CSE configure results")
-ctest_submit()
-
-if(subprojects)
-  message("Building by looping over subprojects...")
-  foreach(subproject ${subprojects})
-    message("##########  ${subproject}  ##########")
-    set_property(GLOBAL PROPERTY SubProject "${subproject}")
-    set_property(GLOBAL PROPERTY Label "${subproject}")
-    ctest_build(TARGET "${subproject}" APPEND)
-    message("Submitting ${subproject} build results")
-    ctest_submit(PARTS build)
-  endforeach()
-else()
-  message("Building all...")
-  ctest_build(APPEND)
-  message("Submitting build results")
-  ctest_submit(PARTS build)
-endif()
diff --git a/Tests/Contracts/cse-snapshot/RunTest.cmake 
b/Tests/Contracts/cse-snapshot/RunTest.cmake
deleted file mode 100644
index 7eb6301..0000000
--- a/Tests/Contracts/cse-snapshot/RunTest.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-set(exe 
"$ENV{HOME}/.cmake/Contracts/cse-snapshot/510345e4/build/built/Release/git-1.6.5.2/bin/git")
-set(args help clone)
-set(cse-snapshot_RUN_TEST ${exe} ${args})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbc9c96691c06cdcff0227ad8292e2a2ea60ec00
commit bbc9c96691c06cdcff0227ad8292e2a2ea60ec00
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Nov 2 09:28:14 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Nov 3 11:30:21 2017 -0400

    Tests: Honor already-set CTEST_REAL_HOME in case of repeat run

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index c25fc44..bd44b17 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -31,7 +31,9 @@ if(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
   set(TEST_HOME_ENV_CODE "# Fake a user home directory to avoid polluting the 
real one.
 # But provide original ENV{HOME} value in ENV{CTEST_REAL_HOME} for tests that
 # need access to the real HOME directory.
-set(ENV{CTEST_REAL_HOME} \"\$ENV{HOME}\")
+if(NOT DEFINED ENV{CTEST_REAL_HOME})
+  set(ENV{CTEST_REAL_HOME} \"\$ENV{HOME}\")
+endif()
 set(ENV{HOME} \"${TEST_HOME}\")
 ")
 endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=701a637e4d0294ad76df7c11244c9b9b2e84716d
commit 701a637e4d0294ad76df7c11244c9b9b2e84716d
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Nov 3 11:23:33 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Nov 3 11:23:33 2017 -0400

    Tests: Fix CTestTestCrash test under ubsan
    
    UBsan causes our test crash to abort instead.  Update our regex to
    tolerate this.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index c25fc44..d2b6969 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2830,7 +2830,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P 
${CMake_SOURCE_DIR}/Utilities/Release
       PASS_REGULAR_EXPRESSION "Failed")
   else()
     set_tests_properties(CTestTestCrash PROPERTIES
-      PASS_REGULAR_EXPRESSION "(Illegal|SegFault)")
+      PASS_REGULAR_EXPRESSION "(Illegal|SegFault|Child aborted)")
   endif()
 
   configure_file(

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=777e87ae00e8920bd6bf971fb40a07e373061500
commit 777e87ae00e8920bd6bf971fb40a07e373061500
Author:     luzpaz <ku...@scribus.net>
AuthorDate: Thu Nov 2 19:14:55 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Nov 3 10:25:05 2017 -0400

    Fix trivial typos in text
    
    Some are user facing.
    
    Found using
    
        codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`
    
    whereby the whitelist contained:
    
        ans
        dum
        helpfull
        emmited
        emmitted
        buil
        iff
        isnt
        nto
        ot
        pathes
        substract
        te
        todays
        upto
        whitespaces

diff --git a/Help/command/add_subdirectory.rst 
b/Help/command/add_subdirectory.rst
index e979253..012ded4 100644
--- a/Help/command/add_subdirectory.rst
+++ b/Help/command/add_subdirectory.rst
@@ -30,7 +30,7 @@ project that is useful but not necessary, such as a set of 
examples.
 Typically the subdirectory should contain its own :command:`project`
 command invocation so that a full build system will be generated in the
 subdirectory (such as a VS IDE solution file).  Note that inter-target
-dependencies supercede this exclusion.  If a target built by the
+dependencies supersede this exclusion.  If a target built by the
 parent project depends on a target in the subdirectory, the dependee
 target will be included in the parent project build system to satisfy
 the dependency.
diff --git a/Help/command/file.rst b/Help/command/file.rst
index 4d4ebb4..5ce86e5 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -110,7 +110,7 @@ regular expressions, but much simpler.  If ``RELATIVE`` 
flag is
 specified, the results will be returned as relative paths to the given
 path.  The results will be ordered lexicographically.
 
-By default ``GLOB`` lists directories - directories are omited in result if
+By default ``GLOB`` lists directories - directories are omitted in result if
 ``LIST_DIRECTORIES`` is set to false.
 
 .. note::
diff --git a/Help/command/install.rst b/Help/command/install.rst
index 58438b7..9f9ee13 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -346,7 +346,7 @@ specified that does not match that given to the targets 
associated with
 included in the export but a target to which it links is not included
 the behavior is unspecified.
 
-In additon to cmake language files, the ``EXPORT_ANDROID_MK`` option maybe
+In addition to cmake language files, the ``EXPORT_ANDROID_MK`` option maybe
 used to specifiy an export to the android ndk build system.  The Android
 NDK supports the use of prebuilt libraries, both static and shared. This
 allows cmake to build the libraries of a project and make them available
diff --git a/Help/dev/testing.rst b/Help/dev/testing.rst
index 731930c..1b29acf 100644
--- a/Help/dev/testing.rst
+++ b/Help/dev/testing.rst
@@ -16,7 +16,7 @@ welcome to provide testing machines in order to help keep 
support for their
 platforms working.
 
 The `CMake Dashboard Scripts Repository`_ provides CTest scripts to drive
-nightly, continous, and experimental testing of CMake.  Use the following
+nightly, continuous, and experimental testing of CMake.  Use the following
 commands to set up a new integration testing client:
 
 .. code-block:: console
diff --git a/Help/release/3.4.rst b/Help/release/3.4.rst
index 89c5561..468627e 100644
--- a/Help/release/3.4.rst
+++ b/Help/release/3.4.rst
@@ -66,7 +66,7 @@ Variables
 Properties
 ----------
 
-* :ref:`Visual Studio Generators` learned to support additonal
+* :ref:`Visual Studio Generators` learned to support additional
   target properties to customize projects for NVIDIA Nsight
   Tegra Visual Studio Edition:
 
diff --git a/Help/release/3.6.rst b/Help/release/3.6.rst
index 144537d..a542b77 100644
--- a/Help/release/3.6.rst
+++ b/Help/release/3.6.rst
@@ -111,7 +111,7 @@ Modules
 
 * The :module:`ExternalProject` module learned to initialize Git submodules
   recursively and also to initialize new submodules on updates.  Use the
-  ``GIT_SUBMODULES`` option to restrict which submodules are initalized and
+  ``GIT_SUBMODULES`` option to restrict which submodules are initialized and
   updated.
 
 * The :module:`ExternalProject` module leared the ``DOWNLOAD_NO_EXTRACT 1``
diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst
index 4c51af4..d4d374b 100644
--- a/Help/release/3.7.rst
+++ b/Help/release/3.7.rst
@@ -237,7 +237,7 @@ CPack
 
 * The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and
   :command:`cpack_ifw_configure_component_group` commands gained a new
-  ``USER_INTERFACES`` option to add a list of additonal pages to the IFW
+  ``USER_INTERFACES`` option to add a list of additional pages to the IFW
   installer.
 
 * The :module:`CPackRPM` module learned to generate debuginfo
diff --git a/Help/variable/LIBRARY_OUTPUT_PATH.rst 
b/Help/variable/LIBRARY_OUTPUT_PATH.rst
index ba02911..bb4328f 100644
--- a/Help/variable/LIBRARY_OUTPUT_PATH.rst
+++ b/Help/variable/LIBRARY_OUTPUT_PATH.rst
@@ -5,5 +5,5 @@ Old library location variable.
 
 The target properties :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`,
 :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY`
-supercede this variable for a target if they are set.  Library targets are
+supersede this variable for a target if they are set.  Library targets are
 otherwise placed in this directory.
diff --git a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake 
b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
index 04529b1..fccff67 100644
--- a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
+++ b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake
@@ -31,7 +31,7 @@ function(android_push_test_files_to_device)
     set(out_var ${out_var} PARENT_SCOPE)
     if(res_var)
       string(REGEX REPLACE ";" " " com "${ARGN}")
-      message(FATAL_ERROR "Error occured during adb command: adb 
${com}\nError: ${err_var}.")
+      message(FATAL_ERROR "Error occurred during adb command: adb 
${com}\nError: ${err_var}.")
     endif()
   endfunction()
 
diff --git a/Modules/CMakePackageConfigHelpers.cmake 
b/Modules/CMakePackageConfigHelpers.cmake
index 90c2a57..f5a8e59 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -154,7 +154,7 @@
 # macro.
 #
 # Internally, this macro executes :command:`configure_file()` to create the
-# resulting version file.  Depending on the ``COMPATIBLITY``, either the file
+# resulting version file.  Depending on the ``COMPATIBILITY``, either the file
 # ``BasicConfigVersion-SameMajorVersion.cmake.in`` or
 # ``BasicConfigVersion-AnyNewerVersion.cmake.in`` is used.  Please note that
 # these two files are internal to CMake and you should not call
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index 8d8b070..05a54a0 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -817,7 +817,7 @@ if(CPACK_IFW_INSTALLERBASE_EXECUTABLE AND NOT 
CPACK_IFW_FRAMEWORK_VERSION_FORCED
       endif()
     endif()
   endforeach()
-  # Finaly try to get version from executable path
+  # Finally try to get version from executable path
   if(NOT CPACK_IFW_FRAMEWORK_VERSION)
     string(REGEX MATCH "[0-9]+(\\.[0-9]+)*"
       CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_INSTALLERBASE_EXECUTABLE}")
@@ -864,7 +864,7 @@ macro(_cpack_ifw_resolve_script _variable)
   endif()
 endmacro()
 
-# Resolve full path to lisense file
+# Resolve full path to license file
 macro(_cpack_ifw_resolve_lisenses _variable)
   if(${_variable})
     set(_ifw_license_file FALSE)
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 9f77ec3..c5a27f9 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -545,7 +545,7 @@
 #                /usr/share/doc
 #
 #  May be used to exclude path (directories or files) from the auto-generated
-#  list of paths discovered by CPack RPM. The defaut value contains a
+#  list of paths discovered by CPack RPM. The default value contains a
 #  reasonable set of values if the variable is not defined by the user. If the
 #  variable is defined by the user then CPackRPM will NOT any of the default
 #  path. If you want to add some path to the default list then you can use
@@ -782,7 +782,7 @@
 #
 # .. note::
 #
-#  Each source path prefix is additionaly suffixed by ``src_<index>`` where
+#  Each source path prefix is additionally suffixed by ``src_<index>`` where
 #  index is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS`
 #  variable. This produces ``<CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX>/src_<index>``
 #  replacement path.
@@ -1985,13 +1985,13 @@ function(cpack_rpm_generate_package)
   # CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or 
CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE)
   # CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or 
CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE)
   # May be used to embed a post (un)installation script in the spec file.
-  # The refered script file(s) will be read and directly
+  # The referred script file(s) will be read and directly
   # put after the %post or %postun section
   # ----------------------------------------------------------------
   # CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or 
CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE)
   # CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE (or 
CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE)
   # May be used to embed a pre (un)installation script in the spec file.
-  # The refered script file(s) will be read and directly
+  # The referred script file(s) will be read and directly
   # put after the %pre or %preun section
   foreach(RPM_SCRIPT_FILE_TYPE_ "INSTALL" "UNINSTALL")
     foreach(RPM_SCRIPT_FILE_TIME_ "PRE" "POST")
@@ -2022,7 +2022,7 @@ function(cpack_rpm_generate_package)
 
   # CPACK_RPM_CHANGELOG_FILE
   # May be used to embed a changelog in the spec file.
-  # The refered file will be read and directly put after the %changelog section
+  # The referred file will be read and directly put after the %changelog 
section
   if(CPACK_RPM_CHANGELOG_FILE)
     if(EXISTS ${CPACK_RPM_CHANGELOG_FILE})
       file(READ ${CPACK_RPM_CHANGELOG_FILE} CPACK_RPM_SPEC_CHANGELOG)
@@ -2152,7 +2152,7 @@ function(cpack_rpm_generate_package)
     string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
     # Transform endline separated - string into CMake List
     string(REPLACE "\n" ";" CPACK_RPM_INSTALL_FILES_LIST 
"${CPACK_RPM_INSTALL_FILES_LIST}")
-    # Remove unecessary quotes
+    # Remove unnecessary quotes
     string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST 
"${CPACK_RPM_INSTALL_FILES_LIST}")
     # Remove ABSOLUTE install file from INSTALL FILE LIST
     list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST 
${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL})
@@ -2413,7 +2413,7 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES}
     endif()
 
     # Disable debuginfo packages - srpm generates invalid packages due to
-    # releasing controll to cpack to generate binary packages.
+    # releasing control to cpack to generate binary packages.
     # Note however that this doesn't prevent cpack to generate debuginfo
     # packages when run from srpm with --rebuild.
     set(TMP_RPM_DISABLE_DEBUGINFO "%define debug_package %{nil}")
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 9370596..a08282e 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -65,7 +65,7 @@ endfunction()
 include(CTestUseLaunchers)
 
 if(BUILD_TESTING)
-  # Setup some auxilary macros
+  # Setup some auxiliary macros
   macro(SET_IF_NOT_SET var val)
     if(NOT DEFINED "${var}")
       set("${var}" "${val}")
diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake 
b/Modules/Compiler/IAR-FindBinUtils.cmake
index 2b04795..b29ee81 100644
--- a/Modules/Compiler/IAR-FindBinUtils.cmake
+++ b/Modules/Compiler/IAR-FindBinUtils.cmake
@@ -17,7 +17,7 @@ if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
   find_program(CMAKE_IAR_ARCHIVE iarchive.exe HINTS ${__iar_hints}
       DOC "The IAR archiver")
 
-  # find auxillary tools
+  # find auxiliary tools
   find_program(CMAKE_IAR_ELFTOOL ielftool.exe HINTS ${__iar_hints}
       DOC "The IAR ELF Tool")
     find_program(CMAKE_IAR_ELFDUMP ielfdumparm.exe HINTS ${__iar_hints}
diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake
index 52ebaf2..43243b9 100644
--- a/Modules/Compiler/IAR.cmake
+++ b/Modules/Compiler/IAR.cmake
@@ -29,7 +29,7 @@
 # "Silent" Operation
 #
 # this really is different to most programs I know.
-# nothing meaningfull from the operation is lost, just some redundant
+# nothing meaningful from the operation is lost, just some redundant
 # code and data size printouts (that can be inspected with common tools).
 
 # This module is shared by multiple languages; use include blocker.
diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake
index fc398e6..6e21249 100644
--- a/Modules/Documentation.cmake
+++ b/Modules/Documentation.cmake
@@ -40,7 +40,7 @@ if (BUILD_DOCUMENTATION)
     )
 
   #
-  # The documentation process is controled by a batch file.
+  # The documentation process is controlled by a batch file.
   # We will probably need bash to create the custom target
   #
 
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 1b93304..fbce235 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -493,7 +493,7 @@ endfunction()
     by the project when available at buildtime, but it also work without.
     ``RECOMMENDED`` is similar to ``OPTIONAL``, i.e.  the project will build if
     the package is not present, but the functionality of the resulting
-    binaries will be severly limited.  If a ``REQUIRED`` package is not
+    binaries will be severely limited.  If a ``REQUIRED`` package is not
     available at buildtime, the project may not even build.  This can be
     combined with the ``FATAL_ON_MISSING_REQUIRED_PACKAGES`` argument for
     ``feature_summary()``.  Last, a ``RUNTIME`` package is a package which is
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d177e5e..8708938 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -581,7 +581,7 @@ mark_as_advanced(
 # Makefile and similar generators don't define CMAKE_CONFIGURATION_TYPES, so we
 # need to add another entry for the CMAKE_BUILD_TYPE.  We also need to add the
 # standerd set of 4 build types (Debug, MinSizeRel, Release, and 
RelWithDebInfo)
-# for completeness.  We need run this loop in order to accomodate the addition
+# for completeness.  We need run this loop in order to accommodate the addition
 # of extra configuration types.  Duplicate entries will be removed by
 # REMOVE_DUPLICATES.
 set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} 
Debug MinSizeRel Release RelWithDebInfo)
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index f78119d..86051cf 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -181,7 +181,7 @@ cuda_execute_process(
 set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}")
 set(CUDA_VERSION @CUDA_VERSION@)
 if(CUDA_VERSION VERSION_LESS "3.0")
-  # Note that this will remove all occurances of -G.
+  # Note that this will remove all occurrences of -G.
   list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G")
 endif()
 
diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake
index 9ba1ff3..2aa5f6f 100644
--- a/Modules/FindCxxTest.cmake
+++ b/Modules/FindCxxTest.cmake
@@ -145,7 +145,7 @@
 #
 # Version 1.3 (8/19/10) (CMake 2.8.3)
 #     Included patch by Simone Rossetto to check if either Python or Perl
-#     are present in the system.  Whichever intepreter that is detected
+#     are present in the system.  Whichever interpreter that is detected
 #     is now used to run the test generator program.  If both interpreters
 #     are detected, the CXXTEST_USE_PYTHON variable is obeyed.
 #
diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake
index 0d86e8e..f348d3a 100644
--- a/Modules/FindDCMTK.cmake
+++ b/Modules/FindDCMTK.cmake
@@ -217,7 +217,7 @@ if(EXISTS ${DCMTK_DIR}/CMakeCache.txt)
   if(NOT EXISTS ${EXTDCMTK_SOURCE_DIR})
     message(FATAL_ERROR
       "DCMTK build directory references
-nonexistant DCMTK source directory ${EXTDCMTK_SOURCE_DIR}")
+nonexistent DCMTK source directory ${EXTDCMTK_SOURCE_DIR}")
   endif()
 endif()
 
diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake
index f6c8e3f..e904a30 100644
--- a/Modules/FindDevIL.cmake
+++ b/Modules/FindDevIL.cmake
@@ -70,5 +70,5 @@ find_library(ILU_LIBRARIES
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DevIL DEFAULT_MSG
                                   IL_LIBRARIES ILU_LIBRARIES
                                   IL_INCLUDE_DIR)
-# provide legacy variable for compatiblity
+# provide legacy variable for compatibility
 set(IL_FOUND ${DevIL_FOUND})
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index fef7fb4..3945b78 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -52,7 +52,7 @@
 #
 #
 #
-# Flex scanners oftenly use tokens defined by Bison: the code generated
+# Flex scanners often use tokens defined by Bison: the code generated
 # by Flex depends of the header generated by Bison.  This module also
 # defines a macro:
 #
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index de20049..012ae22 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -479,7 +479,7 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE)
             #if we detect that occurrence clear the suffix
             if(_suffix AND NOT TARGET ${HDF5_${_lang}_TARGET}${_suffix})
               if(NOT TARGET ${HDF5_${_lang}_TARGET})
-                #cant find this component with or without the suffix
+                #can't find this component with or without the suffix
                 #so bail out, and let the following locate HDF5
                 set(HDF5_FOUND FALSE)
                 break()
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index cebba10..96e3e21 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -25,7 +25,7 @@
 #   JAVA_INCLUDE_PATH2    = the include path to jni_md.h
 #   JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
 
-# Expand {libarch} occurences to java_libarch subdirectory(-ies) and set 
${_var}
+# Expand {libarch} occurrences to java_libarch subdirectory(-ies) and set 
${_var}
 macro(java_append_library_directories _var)
     # Determine java arch-specific library subdir
     # Mostly based on openjdk/jdk/make/common/shared/Platform.gmk as of openjdk
@@ -46,7 +46,7 @@ macro(java_append_library_directories _var)
         set(_java_libarch "arm" "aarch32")
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
         # mips* machines are bi-endian mostly so processor does not tell
-        # endianess of the underlying system.
+        # endianness of the underlying system.
         set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb" 
"mips64" "mips64el" "mipsn32" "mipsn32el")
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le")
         set(_java_libarch "ppc64" "ppc64le")
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 7d4ed6a..c79642d 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1198,7 +1198,7 @@ if(_numbers_of_matlab_roots EQUAL 0)
 
 
   # At this point, we have no other choice than trying to find it from PATH.
-  # If set by the user, this wont change
+  # If set by the user, this won't change
   find_program(
     _matlab_main_tmp
     NAMES matlab)
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 0187e0d..c358ff1 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -110,7 +110,7 @@ if(WIN32 AND NOT CYGWIN)
     #   * MTd for static-debug
 
     # Implementation details:
-    # We are using the libraries located in the VC subdir instead of the 
parent directory eventhough :
+    # We are using the libraries located in the VC subdir instead of the 
parent directory even though :
     # libeay32MD.lib is identical to ../libeay32.lib, and
     # ssleay32MD.lib is identical to ../ssleay32.lib
     # enable OPENSSL_USE_STATIC_LIBS to use the static libs located in 
lib/VC/static
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index b6e24a3..a711493 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -26,7 +26,7 @@
 #
 #
 # In an effort to remove some clutter and clear up some issues for
-# people who are not necessarily Tcl/Tk gurus/developpers, some
+# people who are not necessarily Tcl/Tk gurus/developers, some
 # variables were moved or removed.  Changes compared to CMake 2.4 are:
 #
 # ::
diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake
index 9711bd6..51fc029 100644
--- a/Modules/FindTclStub.cmake
+++ b/Modules/FindTclStub.cmake
@@ -32,7 +32,7 @@
 #
 #
 # In an effort to remove some clutter and clear up some issues for
-# people who are not necessarily Tcl/Tk gurus/developpers, some
+# people who are not necessarily Tcl/Tk gurus/developers, some
 # variables were moved or removed.  Changes compared to CMake 2.4 are:
 #
 # ::
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index be84999..e08afe4 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -915,7 +915,7 @@ if (_wx_lib_missing)
 endif()
 unset(_wx_lib_missing)
 
-# Check if a specfic version was requested by find_package().
+# Check if a specific version was requested by find_package().
 if(wxWidgets_FOUND)
   find_file(_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} 
NO_DEFAULT_PATH)
   dbg_msg("_filename:  ${_filename}")
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index 76eb6be..054a1bf 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -390,7 +390,7 @@ if(WIN32_STYLE_FIND)
 
   if (NOT WXWINDOWS_USE_SHARED_LIBS)
     set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
-      ##  these ones dont seem required, in particular  ctl3d32 is not 
neccesary (Jan Woetzel 07/2003)
+      ##  these ones don't seem required, in particular  ctl3d32 is not 
necessary (Jan Woetzel 07/2003)
       #   ctl3d32
       debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB}   optimized 
${WXWINDOWS_STATIC_LIBRARY_ZLIB}
       debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_REGEX}  optimized 
${WXWINDOWS_STATIC_LIBRARY_REGEX}
@@ -546,7 +546,7 @@ if(WIN32_STYLE_FIND)
   endif()
 
 
-  ## not neccessary in wxWindows 2.4.1 and 2.6.2
+  ## not necessary in wxWindows 2.4.1 and 2.6.2
   ## but it may fix a previous bug, see
   ## 
http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:37574:200305:mpdioeneabobmgjenoap
   option(WXWINDOWS_SET_DEFINITIONS "Set additional defines for wxWindows" OFF)
diff --git a/Modules/ITKCompatibility.cmake b/Modules/ITKCompatibility.cmake
index fef0653..7d211b6 100644
--- a/Modules/ITKCompatibility.cmake
+++ b/Modules/ITKCompatibility.cmake
@@ -2,6 +2,6 @@
 # file Copyright.txt or https://cmake.org/licensing for details.
 
 
-# work around an old bug in ITK prior to verison 3.0
+# work around an old bug in ITK prior to version 3.0
 set(TIFF_RIGHT_VERSION 1)
 
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 0478918..aee4028 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -151,7 +151,7 @@ macro (QT4_GENERATE_MOC infile outfile )
       set(moc_target ${ARGV3})
    endif()
    QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "" 
"${moc_target}")
-   set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE)  # 
dont run automoc on this file
+   set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE)  # 
don't run automoc on this file
 endmacro ()
 
 
diff --git a/Modules/SquishTestScript.cmake b/Modules/SquishTestScript.cmake
index cfdfaec..c0e1bea 100644
--- a/Modules/SquishTestScript.cmake
+++ b/Modules/SquishTestScript.cmake
@@ -34,7 +34,7 @@ message(STATUS 
"squish_settingsgroup='${squish_settingsgroup}'")
 message(STATUS "squish_pre_command='${squish_pre_command}'")
 message(STATUS "squish_post_command='${squish_post_command}'")
 
-# parse enviornment variables
+# parse environment variables
 foreach(i ${squish_env_vars})
   message(STATUS "parsing env var key/value pair ${i}")
   string(REGEX MATCH "([^=]*)=(.*)" squish_env_name ${i})
diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake
index 942bc38..700bfe6 100644
--- a/Modules/UseEcos.cmake
+++ b/Modules/UseEcos.cmake
@@ -181,7 +181,7 @@ macro(ECOS_ADD_EXECUTABLE _exe_NAME )
 #the executable depends on ecos target.ld
    ECOS_ADD_TARGET_LIB(${ARGN})
 
-# when using nmake makefiles, the custom buildtype supresses the default 
cl.exe flags
+# when using nmake makefiles, the custom buildtype suppresses the default 
cl.exe flags
 # and the rules for creating objects are adjusted for gcc
    set(CMAKE_BUILD_TYPE CUSTOM_ECOS_BUILD)
    set(CMAKE_C_COMPILE_OBJECT     "<CMAKE_C_COMPILER>   <DEFINES> <INCLUDES> 
<FLAGS> -o <OBJECT> -c <SOURCE>")
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 5e06adc..b5fc236 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -286,7 +286,7 @@
 #
 #    Example:
 #    create_javadoc(my_example_doc
-#      PACKAGES com.exmaple.foo com.example.bar
+#      PACKAGES com.example.foo com.example.bar
 #      SOURCEPATH "${CMAKE_CURRENT_SOURCE_DIR}"
 #      CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
 #      WINDOWTITLE "My example"
diff --git a/Source/CPack/WiX/cmWIXPatchParser.cxx 
b/Source/CPack/WiX/cmWIXPatchParser.cxx
index e6aeed3..c6ca944 100644
--- a/Source/CPack/WiX/cmWIXPatchParser.cxx
+++ b/Source/CPack/WiX/cmWIXPatchParser.cxx
@@ -90,7 +90,7 @@ void cmWIXPatchParser::StartFragment(const char** attributes)
     }
   }
 
-  /* add any additional attributes for the fragement */
+  /* add any additional attributes for the fragment */
   if (!new_element) {
     ReportValidationError("No 'Id' specified for 'CPackWixFragment' element");
   } else {
diff --git a/Source/CPack/bills-comments.txt b/Source/CPack/bills-comments.txt
index c3b4ee8..1aaf9af 100644
--- a/Source/CPack/bills-comments.txt
+++ b/Source/CPack/bills-comments.txt
@@ -31,7 +31,7 @@ cmCPackGenericGenerator::ProcessGenerator   // DoPackage
 
 
 cmCPackGenericGenerator::InstallProject is used for both source and binary
-packages.  It is controled based on values set in CPACK_ variables.
+packages.  It is controlled based on values set in CPACK_ variables.
 
 
 InstallProject
diff --git a/Source/CTest/cmCTestScriptHandler.cxx 
b/Source/CTest/cmCTestScriptHandler.cxx
index fdd9622..198f6e5 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -81,7 +81,7 @@ cmCTestScriptHandler::cmCTestScriptHandler()
 
   this->ScriptStartTime = 0;
 
-  // the *60 is becuase the settings are in minutes but GetTime is seconds
+  // the *60 is because the settings are in minutes but GetTime is seconds
   this->MinimumInterval = 30 * 60;
   this->ContinuousDuration = -1;
 }
@@ -830,7 +830,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
     }
   }
 
-  // if all was succesful, delete the backup dirs to free up disk space
+  // if all was successful, delete the backup dirs to free up disk space
   if (this->Backup) {
     cmSystemTools::RemoveADirectory(this->BackupSourceDir);
     cmSystemTools::RemoveADirectory(this->BackupBinaryDir);
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx 
b/Source/CTest/cmCTestSubmitHandler.cxx
index e51e168..719688c 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -1521,7 +1521,7 @@ int cmCTestSubmitHandler::ProcessHandler()
       this->CTest->GetCTestConfiguration("DropLocation");
 
     // change to the build directory so that we can uses a relative path
-    // on windows since scp dosn't support "c:" a drive in the path
+    // on windows since scp doesn't support "c:" a drive in the path
     cmWorkingDirectory workdir(buildDirectory);
 
     if (!this->SubmitUsingSCP(this->CTest->GetCTestConfiguration("ScpCommand"),
@@ -1540,7 +1540,7 @@ int cmCTestSubmitHandler::ProcessHandler()
     std::string location = this->CTest->GetCTestConfiguration("DropLocation");
 
     // change to the build directory so that we can uses a relative path
-    // on windows since scp dosn't support "c:" a drive in the path
+    // on windows since scp doesn't support "c:" a drive in the path
     cmWorkingDirectory workdir(buildDirectory);
     cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
                        "   Change directory: " << buildDirectory << std::endl,
diff --git a/Source/CTest/cmCTestTestHandler.h 
b/Source/CTest/cmCTestTestHandler.h
index 394d20e..620e906 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -39,7 +39,7 @@ public:
   int ProcessHandler() override;
 
   /**
-   * When both -R and -I are used should te resulting test list be the
+   * When both -R and -I are used should the resulting test list be the
    * intersection or the union of the lists. By default it is the
    * intersection.
    */
diff --git a/Source/CTest/cmParseGTMCoverage.cxx 
b/Source/CTest/cmParseGTMCoverage.cxx
index 9948ede..f965048 100644
--- a/Source/CTest/cmParseGTMCoverage.cxx
+++ b/Source/CTest/cmParseGTMCoverage.cxx
@@ -93,7 +93,7 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
         // This section accounts for lines that were previously marked
         // as non-executable code (-1), if the parser comes back with
         // a non-zero count, increase the count by 1 to push the line
-        // into the executable code set in addtion to the count found.
+        // into the executable code set in addition to the count found.
         if (coverageVector[lineoffset + linenumber] == -1 && count > 0) {
           coverageVector[lineoffset + linenumber] += count + 1;
         } else {
diff --git a/Source/cmCMakeHostSystemInformationCommand.h 
b/Source/cmCMakeHostSystemInformationCommand.h
index bfff8f1..b871641 100644
--- a/Source/cmCMakeHostSystemInformationCommand.h
+++ b/Source/cmCMakeHostSystemInformationCommand.h
@@ -20,7 +20,7 @@ class SystemInformation;
  * \brief Query host system specific information
  *
  * cmCMakeHostSystemInformationCommand queries system information of
- * the sytem on which CMake runs.
+ * the system on which CMake runs.
  */
 class cmCMakeHostSystemInformationCommand : public cmCommand
 {
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index e9e6570..28cba85 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -107,7 +107,7 @@ public:
                  std::set<std::string>& excludes,
                  std::set<std::string>& includes);
 
-  ///! Save cache for given makefile.  Saves to ouput path/CMakeCache.txt
+  ///! Save cache for given makefile.  Saves to output path/CMakeCache.txt
   bool SaveCache(const std::string& path);
 
   ///! Delete the cache given
diff --git a/Source/cmConvertMSBuildXMLToJSON.py 
b/Source/cmConvertMSBuildXMLToJSON.py
index 93ab8a8..92569e7 100644
--- a/Source/cmConvertMSBuildXMLToJSON.py
+++ b/Source/cmConvertMSBuildXMLToJSON.py
@@ -343,7 +343,7 @@ def __with_argument(node, value):
 
 
 def __preprocess_arguments(root):
-    """Preprocesses occurrances of Argument within the root.
+    """Preprocesses occurrences of Argument within the root.
 
     Argument XML values reference other values within the document by name. The
     referenced value does not contain a switch. This function will add the
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 7f0cb97..7985d0f 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -591,7 +591,7 @@ void 
cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
     std::string::size_type commaPos = input.find(',', nameStartPos);
     std::string::size_type nextOpenPos = input.find("$<", nameStartPos);
     if (commaPos == std::string::npos    // Implied 'this' target
-        || closePos == std::string::npos // Imcomplete expression.
+        || closePos == std::string::npos // Incomplete expression.
         || closePos < commaPos           // Implied 'this' target
         || nextOpenPos < commaPos)       // Non-literal
     {
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 8142962..f771150 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -329,7 +329,7 @@ void cmFindCommon::ComputeFinalPaths()
   std::set<std::string> ignored;
   this->GetIgnoredPaths(ignored);
 
-  // Combine the seperate path types, filtering out ignores
+  // Combine the separate path types, filtering out ignores
   this->SearchPaths.clear();
   std::vector<PathLabel>& allLabels = this->PathGroupLabelMap[PathGroup::All];
   for (PathLabel const& l : allLabels) {
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 5a72655..103dc5f 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -590,7 +590,7 @@ void cmFindPackageCommand::SetModuleVariables(const 
std::string& components)
     this->AddFindDefinition(exact, this->VersionExact ? "1" : "0");
   }
 
-  // Push on to the pacakge stack
+  // Push on to the package stack
   this->Makefile->FindPackageModuleStack.push_back(this->Name);
 }
 
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 11ea46f..eba95f5 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -962,7 +962,7 @@ std::string cmGlobalGenerator::GetLanguageOutputExtension(
     }
   } else {
     // if no language is found then check to see if it is already an
-    // ouput extension for some language.  In that case it should be ignored
+    // output extension for some language.  In that case it should be ignored
     // and in this map, so it will not be compiled but will just be used.
     std::string const& ext = source.GetExtension();
     if (!ext.empty()) {
diff --git a/Source/cmGlobalKdevelopGenerator.cxx 
b/Source/cmGlobalKdevelopGenerator.cxx
index b1e630e..80aadb9 100644
--- a/Source/cmGlobalKdevelopGenerator.cxx
+++ b/Source/cmGlobalKdevelopGenerator.cxx
@@ -110,7 +110,7 @@ bool cmGlobalKdevelopGenerator::CreateFilelistFile(
            nullptr)) {
         files.insert(tmp);
         tmp = cmSystemTools::GetFilenameName(tmp);
-        // add all files which dont match the default
+        // add all files which don't match the default
         // */CMakeLists.txt;*cmake; to the file pattern
         if ((tmp != "CMakeLists.txt") &&
             (strstr(tmp.c_str(), ".cmake") == nullptr)) {
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx 
b/Source/cmGlobalVisualStudio71Generator.cxx
index 3b45c90..8a9a3fb 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -222,7 +222,7 @@ void 
cmGlobalVisualStudio71Generator::WriteProjectConfigurations(
   }
 }
 
-// ouput standard header for dsw file
+// output standard header for dsw file
 void cmGlobalVisualStudio71Generator::WriteSLNHeader(std::ostream& fout)
 {
   fout << "Microsoft Visual Studio Solution File, Format Version 8.00\n";
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx 
b/Source/cmGlobalVisualStudio8Generator.cxx
index cc1d1a2..dee874f 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -146,7 +146,7 @@ bool 
cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p,
   }
 }
 
-// ouput standard header for dsw file
+// output standard header for dsw file
 void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout)
 {
   fout << "Microsoft Visual Studio Solution File, Format Version 9.00\n";
diff --git a/Source/cmIncludeDirectoryCommand.cxx 
b/Source/cmIncludeDirectoryCommand.cxx
index 4c30607..7bd6cb9 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -77,7 +77,7 @@ static bool StartsWithGeneratorExpression(const std::string& 
input)
 // do a lot of cleanup on the arguments because this is one place where folks
 // sometimes take the output of a program and pass it directly into this
 // command not thinking that a single argument could be filled with spaces
-// and newlines etc liek below:
+// and newlines etc like below:
 //
 // "   /foo/bar
 //    /boo/hoo /dingle/berry "
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 9c8dae3..e4ec469 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -599,7 +599,7 @@ void cmMakefile::EnforceDirectoryLevelRules() const
         << "\"cmake --help-policy CMP0000\".";
     switch (this->GetPolicyStatus(cmPolicies::CMP0000)) {
       case cmPolicies::WARN:
-        // Warn because the user did not provide a mimimum required
+        // Warn because the user did not provide a minimum required
         // version.
         this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
                                                msg.str(), this->Backtrace);
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 5e7a361..bc8c2d1 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -561,7 +561,7 @@ public:
                        bool atOnly, bool escapeQuotes) const;
 
   /**
-   * Copy file but change lines acording to ConfigureString
+   * Copy file but change lines according to ConfigureString
    */
   int ConfigureFile(const char* infile, const char* outfile, bool copyonly,
                     bool atOnly, bool escapeQuotes,
@@ -800,7 +800,7 @@ public:
   void RemoveExportBuildFileGeneratorCMP0024(cmExportBuildFileGenerator* gen);
   void AddExportBuildFileGenerator(cmExportBuildFileGenerator* gen);
 
-  // Maintain a stack of pacakge names to determine the depth of find modules
+  // Maintain a stack of package names to determine the depth of find modules
   // we are currently being called with
   std::deque<std::string> FindPackageModuleStack;
 
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 43fb5f5..5a341bd 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -63,7 +63,7 @@ bool cmMessageCommand::InitialPass(std::vector<std::string> 
const& args,
   std::string message = cmJoin(cmMakeRange(i, args.end()), std::string());
 
   if (type != cmake::MESSAGE) {
-    // we've overriden the message type, above, so display it directly
+    // we've overridden the message type, above, so display it directly
     cmMessenger* m = this->Makefile->GetMessenger();
     m->DisplayMessage(type, message, this->Makefile->GetBacktrace());
   } else {
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index b329d38..28a8df1 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -827,7 +827,7 @@ bool cmQtAutoGenerators::ParseHeaderFile(std::string const& 
absFilename,
 bool cmQtAutoGenerators::ParsePostprocess()
 {
   bool success = true;
-  // Read missin dependecies
+  // Read missing dependencies
   for (auto& item : this->MocJobsIncluded) {
     if (!item->DependsValid) {
       std::string content;
@@ -1427,7 +1427,7 @@ bool cmQtAutoGenerators::MocGenerateAll()
       }
     }
 
-    // Add moc_predefs.h to moc file dependecies
+    // Add moc_predefs.h to moc file dependencies
     for (auto const& item : this->MocJobsIncluded) {
       item->Depends.insert(this->MocPredefsFileAbs);
     }
diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h
index daa902e..b698db6 100644
--- a/Source/cmTargetDepend.h
+++ b/Source/cmTargetDepend.h
@@ -16,7 +16,7 @@ class cmTargetDepend
   cmGeneratorTarget const* Target;
 
   // The set order depends only on the Target, so we use
-  // mutable members to acheive a map with set syntax.
+  // mutable members to achieve a map with set syntax.
   mutable bool Link;
   mutable bool Util;
 
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index e747adb..f1e9283 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -153,7 +153,7 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
       if (unixEpoch == -1) {
         cmSystemTools::Error(
           "Error generating UNIX epoch in "
-          "STRING(TIMESTAMP ...). Please, file a bug report aginst CMake");
+          "STRING(TIMESTAMP ...). Please, file a bug report against CMake");
         return std::string();
       }
 
diff --git a/Source/cmUseMangledMesaCommand.cxx 
b/Source/cmUseMangledMesaCommand.cxx
index c04a683..8d4b018 100644
--- a/Source/cmUseMangledMesaCommand.cxx
+++ b/Source/cmUseMangledMesaCommand.cxx
@@ -13,8 +13,8 @@ bool 
cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
                                           cmExecutionStatus&)
 {
   // expected two arguments:
-  // arguement one: the full path to gl_mangle.h
-  // arguement two : directory for output of edited headers
+  // argument one: the full path to gl_mangle.h
+  // argument two : directory for output of edited headers
   if (args.size() != 2) {
     this->SetError("called with incorrect number of arguments");
     return false;
diff --git a/Tests/CFBundleTest/np_macmain.cpp 
b/Tests/CFBundleTest/np_macmain.cpp
index b5a4226..e5fd0d7 100644
--- a/Tests/CFBundleTest/np_macmain.cpp
+++ b/Tests/CFBundleTest/np_macmain.cpp
@@ -4,7 +4,7 @@
   Based on the default np_macmain.cpp from FireBreath
   http://firebreath.googlecode.com
 
-  This file has been stripped to prevent it from accidently
+  This file has been stripped to prevent it from accidentally
   doing anything useful.
 \***********************************************************/
 
diff --git a/Tests/CTestTestStopTime/GetDate.cmake 
b/Tests/CTestTestStopTime/GetDate.cmake
index 46ab2fb..64a4fb9 100644
--- a/Tests/CTestTestStopTime/GetDate.cmake
+++ b/Tests/CTestTestStopTime/GetDate.cmake
@@ -68,7 +68,7 @@ macro(GET_DATE)
 
   #
   # Extract six individual components by matching a regex with paren groupings.
-  # Use the replace functionality and \\1 thru \\6 to extract components.
+  # Use the replace functionality and \\1 through \\6 to extract components.
   #
   set(${GD_PREFIX}REGEX "([^/]+)/([^/]+)/([^ ]+) +([^:]+):([^:]+):([^\\.]+)")
 
diff --git a/Tests/FortranModules/test_preprocess.F90 
b/Tests/FortranModules/test_preprocess.F90
index 3a09976..c5a5ec3 100644
--- a/Tests/FortranModules/test_preprocess.F90
+++ b/Tests/FortranModules/test_preprocess.F90
@@ -1,5 +1,5 @@
 MODULE Available
-! no conent
+! no content
 END MODULE
 
 PROGRAM PPTEST
diff --git a/Tests/FortranModules/test_preprocess_module.F90 
b/Tests/FortranModules/test_preprocess_module.F90
index 5849b62..fdbc051 100644
--- a/Tests/FortranModules/test_preprocess_module.F90
+++ b/Tests/FortranModules/test_preprocess_module.F90
@@ -1,5 +1,5 @@
 #ifdef FOO
 MODULE PPAvailable
-! no conent
+! no content
 END MODULE
 #endif
diff --git a/Tests/OutOfSource/CMakeLists.txt b/Tests/OutOfSource/CMakeLists.txt
index de1603a..4687882 100644
--- a/Tests/OutOfSource/CMakeLists.txt
+++ b/Tests/OutOfSource/CMakeLists.txt
@@ -1,4 +1,4 @@
-# a simple test cas
+# a simple test case
 cmake_minimum_required (VERSION 2.6)
 project (OutOfSource)
 
diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt
index cf7c02c..5a95927 100644
--- a/Tests/RunCMake/CPack/README.txt
+++ b/Tests/RunCMake/CPack/README.txt
@@ -149,7 +149,7 @@ this step and must contain
   NOTE: This variable should be used only as last resort as it sets generator
         specific regular expression.
         EXPECTED_FILE_CONTENT_<file_number_starting_with_1>_LIST should be
-        prefered as it requires a list of expected files and directories that
+        preferred as it requires a list of expected files and directories that
         is later changed automatically depending on the generator so expected
         package content can be written only once per test for all generators.
 
@@ -209,7 +209,7 @@ To add a new generator we must
       + FILE that will contain the package file for which the package content
         should be returned.
       + RESULT_VAR that will tell the function which variable in parent scope
-        should contain the result (list of pacakge content)
+        should contain the result (list of package content)
     - toExpectedContentList: This function should convert an expected package
                              content list into one that is expected for the
                              generator (e.g. rpm packages have install/relocate
diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake 
b/Tests/RunCMake/message/RunCMakeTest.cmake
index 2346c86..24dad03 100644
--- a/Tests/RunCMake/message/RunCMakeTest.cmake
+++ b/Tests/RunCMake/message/RunCMakeTest.cmake
@@ -7,6 +7,6 @@ run_cmake(nomessage-internal-warning)
 run_cmake(warnmessage)
 # message command sets fatal occurred flag, so check each type of error
 
-# seperately
+# separately
 run_cmake(errormessage_deprecated)
 run_cmake(errormessage_dev)
diff --git a/Utilities/cmcurl/CMake/Utilities.cmake 
b/Utilities/cmcurl/CMake/Utilities.cmake
index 8b6276d..005b166 100644
--- a/Utilities/cmcurl/CMake/Utilities.cmake
+++ b/Utilities/cmcurl/CMake/Utilities.cmake
@@ -19,7 +19,7 @@ function(LIST_SPACES_APPEND_ONCE LIST_NAME)
   set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE)
 endfunction()
 
-# Convinience function that does the same as LIST(FIND ...) but with a 
TRUE/FALSE return value.
+# Convenience function that does the same as LIST(FIND ...) but with a 
TRUE/FALSE return value.
 # Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND)
 function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
   list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3048777006e1d10646e7b62f46406859dc4d0812
commit 3048777006e1d10646e7b62f46406859dc4d0812
Merge: 817331a 5464e23
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Nov 2 09:48:53 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Nov 2 09:48:53 2017 -0400

    Merge branch 'upstream-KWSys' into update-kwsys
    
    * upstream-KWSys:
      KWSys 2017-11-02 (54f0901a)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5464e23ff5e822b8a99a3cd234c54ff4632ccb98
commit 5464e23ff5e822b8a99a3cd234c54ff4632ccb98
Author:     KWSys Upstream <kwro...@kitware.com>
AuthorDate: Thu Nov 2 09:44:34 2017 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Nov 2 09:48:53 2017 -0400

    KWSys 2017-11-02 (54f0901a)
    
    Code extracted from:
    
        https://gitlab.kitware.com/utils/kwsys.git
    
    at commit 54f0901ad1a1c545a1360a19b5c521857b5a66ec (master).
    
    Upstream Shortlog
    -----------------
    
    Bryon Bean (1):
          8e428c18 Process: Add function to kill process (and children) with pid

diff --git a/Process.h.in b/Process.h.in
index 237001c..6cb9443 100644
--- a/Process.h.in
+++ b/Process.h.in
@@ -77,6 +77,7 @@
 #define kwsysProcess_WaitForExit kwsys_ns(Process_WaitForExit)
 #define kwsysProcess_Interrupt kwsys_ns(Process_Interrupt)
 #define kwsysProcess_Kill kwsys_ns(Process_Kill)
+#define kwsysProcess_KillPID kwsys_ns(Process_KillPID)
 #define kwsysProcess_ResetStartTime kwsys_ns(Process_ResetStartTime)
 #endif
 
@@ -457,6 +458,13 @@ kwsysEXPORT void kwsysProcess_Interrupt(kwsysProcess* cp);
 kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
 
 /**
+ * Same as kwsysProcess_Kill using process ID to locate process to
+ * terminate.
+ * @see kwsysProcess_Kill(kwsysProcess* cp)
+ */
+kwsysEXPORT void kwsysProcess_KillPID(unsigned long);
+
+/**
  * Reset the start time of the child process to the current time.
  */
 kwsysEXPORT void kwsysProcess_ResetStartTime(kwsysProcess* cp);
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index e62ef34..718a1aa 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -2485,6 +2485,11 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
 #define KWSYSPE_PS_FORMAT "%d %d %*[^\n]\n"
 #endif
 
+void kwsysProcess_KillPID(unsigned long process_id)
+{
+  kwsysProcessKill((pid_t)process_id);
+}
+
 static void kwsysProcessKill(pid_t process_id)
 {
 #if defined(__linux__) || defined(__CYGWIN__)
diff --git a/ProcessWin32.c b/ProcessWin32.c
index 945fa28..82fdc74 100644
--- a/ProcessWin32.c
+++ b/ProcessWin32.c
@@ -1466,6 +1466,11 @@ void kwsysProcess_Kill(kwsysProcess* cp)
      for them to exit.  */
 }
 
+void kwsysProcess_KillPID(unsigned long process_id)
+{
+  kwsysProcessKillTree((DWORD)process_id);
+}
+
 /*
   Function executed for each pipe's thread.  Argument is a pointer to
   the kwsysProcessPipeData instance for this thread.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f61052ad390773610e14367c14fb53ad2e6b789e
commit f61052ad390773610e14367c14fb53ad2e6b789e
Author:     Mark Salisbury <mark.salisb...@hp.com>
AuthorDate: Wed Nov 1 17:21:18 2017 -0600
Commit:     Mark Salisbury <mark.salisb...@hp.com>
CommitDate: Wed Nov 1 17:21:18 2017 -0600

    FindBZip2: Normalize slashes when legacy BZIP2_LIBRARIES is specified
    
    On Windows if you specify the library path using a regular Windows
    path with backslashes, FindBZip2 announces that it found the library,
    but the value is reported with backslashes instead of forward slashes.
    This breaks assumptions elsewhere in CMake.  Convert slashes explicitly.

diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index d2307f1..0375b09 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -38,6 +38,8 @@ if (NOT BZIP2_LIBRARIES)
 
     include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
     SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
+else ()
+    file(TO_CMAKE_PATH "${BZIP2_LIBRARIES}" BZIP2_LIBRARIES)
 endif ()
 
 if (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39c2feaf8c4dcb9c3a30c68a066fb70e126d7fe6
commit 39c2feaf8c4dcb9c3a30c68a066fb70e126d7fe6
Author:     Justin Berger <j.david.ber...@gmail.com>
AuthorDate: Sat Jul 22 18:34:33 2017 -0600
Commit:     Justin Berger <j.david.ber...@gmail.com>
CommitDate: Wed Nov 1 11:32:11 2017 -0600

    misc: Added utility method to allow working with stacks

diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 8e8a54d..cbcf200 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -438,6 +438,19 @@ void cmListFileBacktrace::PrintCallStack(std::ostream& 
out) const
   }
 }
 
+size_t cmListFileBacktrace::Depth() const
+{
+  size_t depth = 0;
+  if (this->Cur == nullptr) {
+    return 0;
+  }
+
+  for (Entry* i = this->Cur->Up; i; i = i->Up) {
+    depth++;
+  }
+  return depth;
+}
+
 std::ostream& operator<<(std::ostream& os, cmListFileContext const& lfc)
 {
   os << lfc.FilePath;
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 349ddef..1f9e374 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -6,6 +6,7 @@
 #include "cmConfigure.h" // IWYU pragma: keep
 
 #include <iosfwd>
+#include <stddef.h>
 #include <string>
 #include <vector>
 
@@ -138,6 +139,9 @@ public:
   // Print the call stack below the top of the backtrace.
   void PrintCallStack(std::ostream& out) const;
 
+  // Get the number of 'frames' in this backtrace
+  size_t Depth() const;
+
 private:
   struct Entry;
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5d2988ea7cc60778dbaa21860aad264c7aa7a81
commit f5d2988ea7cc60778dbaa21860aad264c7aa7a81
Author:     Justin Berger <j.david.ber...@gmail.com>
AuthorDate: Mon Aug 21 12:22:52 2017 -0600
Commit:     Justin Berger <j.david.ber...@gmail.com>
CommitDate: Wed Nov 1 11:32:11 2017 -0600

    server: Swapped to cm_thread impl

diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx
index e923c22..9af4c0a 100644
--- a/Source/cmServer.cxx
+++ b/Source/cmServer.cxx
@@ -245,11 +245,10 @@ cmFileMonitor* cmServer::FileMonitor() const
 void cmServer::WriteJsonObject(const Json::Value& jsonValue,
                                const DebugInfo* debug) const
 {
-  uv_rwlock_rdlock(&ConnectionsMutex);
+  cm::shared_lock<cm::shared_mutex> lock(ConnectionsMutex);
   for (auto& connection : this->Connections) {
     WriteJsonObject(connection.get(), jsonValue, debug);
   }
-  uv_rwlock_rdunlock(&ConnectionsMutex);
 }
 
 void cmServer::WriteJsonObject(cmConnection* connection,
@@ -456,14 +455,12 @@ bool cmServerBase::Serve(std::string* errorMessage)
   OnServeStart();
 
   {
-    uv_rwlock_rdlock(&ConnectionsMutex);
+    cm::shared_lock<cm::shared_mutex> lock(ConnectionsMutex);
     for (auto& connection : Connections) {
       if (!connection->OnServeStart(errorMessage)) {
-        uv_rwlock_rdunlock(&ConnectionsMutex);
         return false;
       }
     }
-    uv_rwlock_rdunlock(&ConnectionsMutex);
   }
 
   if (uv_run(&Loop, UV_RUN_DEFAULT) != 0) {
@@ -501,12 +498,11 @@ void cmServerBase::StartShutDown()
   }
 
   {
-    uv_rwlock_wrlock(&ConnectionsMutex);
+    cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
     for (auto& connection : Connections) {
       connection->OnConnectionShuttingDown();
     }
     Connections.clear();
-    uv_rwlock_wrunlock(&ConnectionsMutex);
   }
 
   uv_walk(&Loop, on_walk_to_shutdown, nullptr);
@@ -525,9 +521,6 @@ cmServerBase::cmServerBase(cmConnection* connection)
   (void)err;
   assert(err == 0);
 
-  err = uv_rwlock_init(&ConnectionsMutex);
-  assert(err == 0);
-
   AddNewConnection(connection);
 }
 
@@ -540,14 +533,14 @@ cmServerBase::~cmServerBase()
   }
 
   uv_loop_close(&Loop);
-  uv_rwlock_destroy(&ConnectionsMutex);
 }
 
 void cmServerBase::AddNewConnection(cmConnection* ownedConnection)
 {
-  uv_rwlock_wrlock(&ConnectionsMutex);
-  Connections.emplace_back(ownedConnection);
-  uv_rwlock_wrunlock(&ConnectionsMutex);
+  {
+    cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+    Connections.emplace_back(ownedConnection);
+  }
   ownedConnection->SetServer(this);
 }
 
@@ -561,11 +554,13 @@ void cmServerBase::OnDisconnect(cmConnection* pConnection)
   auto pred = [pConnection](const std::unique_ptr<cmConnection>& m) {
     return m.get() == pConnection;
   };
-  uv_rwlock_wrlock(&ConnectionsMutex);
-  Connections.erase(
-    std::remove_if(Connections.begin(), Connections.end(), pred),
-    Connections.end());
-  uv_rwlock_wrunlock(&ConnectionsMutex);
+  {
+    cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+    Connections.erase(
+      std::remove_if(Connections.begin(), Connections.end(), pred),
+      Connections.end());
+  }
+
   if (Connections.empty()) {
     StartShutDown();
   }
diff --git a/Source/cmServer.h b/Source/cmServer.h
index 15fd2ba..6e46f8c 100644
--- a/Source/cmServer.h
+++ b/Source/cmServer.h
@@ -5,6 +5,7 @@
 #include "cmConfigure.h" // IWYU pragma: keep
 
 #include "cm_jsoncpp_value.h"
+#include "cm_thread.hxx"
 #include "cm_uv.h"
 
 #include <memory> // IWYU pragma: keep
@@ -61,7 +62,7 @@ public:
   void OnDisconnect(cmConnection* pConnection);
 
 protected:
-  mutable uv_rwlock_t ConnectionsMutex;
+  mutable cm::shared_mutex ConnectionsMutex;
   std::vector<std::unique_ptr<cmConnection>> Connections;
 
   bool ServeThreadRunning = false;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2636d86ce2f45f06bdcf4cb60c15df55838a3aa7
commit 2636d86ce2f45f06bdcf4cb60c15df55838a3aa7
Author:     Justin Berger <j.david.ber...@gmail.com>
AuthorDate: Mon Aug 21 12:27:10 2017 -0600
Commit:     Justin Berger <j.david.ber...@gmail.com>
CommitDate: Wed Nov 1 11:32:11 2017 -0600

    utility: Added minimal std::thread drop-in

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index e1c34bf..b016f40 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -593,6 +593,7 @@ set(SRCS
   cm_utf8.c
   cm_codecvt.hxx
   cm_codecvt.cxx
+  cm_thread.hxx
   )
 
 SET_PROPERTY(SOURCE cmProcessOutput.cxx APPEND PROPERTY COMPILE_DEFINITIONS
diff --git a/Source/cm_thread.hxx b/Source/cm_thread.hxx
new file mode 100644
index 0000000..b8c25c7
--- /dev/null
+++ b/Source/cm_thread.hxx
@@ -0,0 +1,78 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#ifndef CM_THREAD_HXX
+#define CM_THREAD_HXX
+
+#include "cmConfigure.h" // IWYU pragma: keep
+#include "cm_uv.h"
+
+namespace cm {
+class mutex
+{
+  uv_mutex_t _M_;
+
+public:
+  mutex() { uv_mutex_init(&_M_); }
+  ~mutex() { uv_mutex_destroy(&_M_); }
+
+  void lock() { uv_mutex_lock(&_M_); }
+
+  void unlock() { uv_mutex_unlock(&_M_); }
+};
+
+template <typename T>
+class lock_guard
+{
+  T& _mutex;
+
+public:
+  lock_guard(T& m)
+    : _mutex(m)
+  {
+    _mutex.lock();
+  }
+  ~lock_guard() { _mutex.unlock(); }
+};
+
+class shared_mutex
+{
+  uv_rwlock_t _M_;
+
+public:
+  shared_mutex() { uv_rwlock_init(&_M_); }
+  ~shared_mutex() { uv_rwlock_destroy(&_M_); }
+
+  void lock() { uv_rwlock_wrlock(&_M_); }
+
+  void unlock() { uv_rwlock_wrunlock(&_M_); }
+
+  void lock_shared() { uv_rwlock_rdlock(&_M_); }
+
+  void unlock_shared() { uv_rwlock_rdunlock(&_M_); }
+};
+
+template <typename T>
+class shared_lock
+{
+  T& _mutex;
+
+public:
+  shared_lock(T& m)
+    : _mutex(m)
+  {
+    _mutex.lock_shared();
+  }
+  ~shared_lock() { _mutex.unlock_shared(); }
+};
+
+template <typename T>
+class unique_lock : public lock_guard<T>
+{
+public:
+  unique_lock(T& m)
+    : lock_guard<T>(m)
+  {
+  }
+};
+}
+#endif

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d46b4ba83532d8954e473a26112288cd8e693775
commit d46b4ba83532d8954e473a26112288cd8e693775
Author:     Justin Berger <j.david.ber...@gmail.com>
AuthorDate: Sun Sep 3 19:56:01 2017 -0600
Commit:     Justin Berger <j.david.ber...@gmail.com>
CommitDate: Wed Nov 1 11:30:35 2017 -0600

    server: Updated server tests to try various communication channels

diff --git a/Tests/Server/cmakelib.py b/Tests/Server/cmakelib.py
index aebc84f..39e3618 100644
--- a/Tests/Server/cmakelib.py
+++ b/Tests/Server/cmakelib.py
@@ -1,5 +1,5 @@
 from __future__ import print_function
-import sys, subprocess, json, os, select
+import sys, subprocess, json, os, select, shutil, time, socket
 
 termwidth = 150
 
@@ -40,25 +40,35 @@ def col_print(title, array):
 
 filterPacket = lambda x: x
 
+STDIN = 0
+PIPE = 1
+
+communicationMethods = [STDIN]
+
+if hasattr(socket, 'AF_UNIX'):
+  communicationMethods.append(PIPE)
+
 def defaultExitWithError(proc):
   data = ""
   try:
-    while select.select([proc.stdout], [], [], 3.)[0]:
-      data = data + proc.stdout.read(1)
+    while select.select([proc.outPipe], [], [], 3.)[0]:
+      data = data + proc.outPipe.read(1)
     if len(data):
       print("Rest of raw buffer from server:")
       printServer(data)
   except:
     pass
-  proc.stdout.close()
-  proc.stdin.close()
+  proc.outPipe.close()
+  proc.inPipe.close()
   proc.kill()
   sys.exit(1)
 
 exitWithError = lambda proc: defaultExitWithError(proc)
 
+serverTag = "SERVER"
+
 def printServer(*args):
-    print("SERVER>", *args)
+    print(serverTag + ">", *args)
     print()
     sys.stdout.flush()
 
@@ -71,7 +81,7 @@ def waitForRawMessage(cmakeCommand):
   stdoutdata = ""
   payload = ""
   while not cmakeCommand.poll():
-    stdoutdataLine = cmakeCommand.stdout.readline()
+    stdoutdataLine = cmakeCommand.outPipe.readline()
     if stdoutdataLine:
       stdoutdata += stdoutdataLine.decode('utf-8')
     else:
@@ -106,26 +116,51 @@ def writeRawData(cmakeCommand, content):
   if print_communication:
     printClient(content, "(Use \\r\\n:", rn, ")")
 
-  cmakeCommand.stdin.write(payload.encode('utf-8'))
-  cmakeCommand.stdin.flush()
+  cmakeCommand.write(payload.encode('utf-8'))
+
 writeRawData.counter = 0
 
 def writePayload(cmakeCommand, obj):
   writeRawData(cmakeCommand, json.dumps(obj))
 
-def initServerProc(cmakeCommand):
-  cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", 
"--experimental", "--debug"],
-                                  stdin=subprocess.PIPE,
-                                  stdout=subprocess.PIPE)
+def getPipeName():
+  return "/tmp/server-test-socket"
+
+def attachPipe(cmakeCommand, pipeName):
+  time.sleep(1)
+  sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+  sock.connect(pipeName)
+  global serverTag
+  serverTag = "SERVER(PIPE)"
+  cmakeCommand.outPipe = sock.makefile()
+  cmakeCommand.inPipe = sock
+  cmakeCommand.write = cmakeCommand.inPipe.sendall
+
+def writeAndFlush(pipe, val):
+  pipe.write(val)
+  pipe.flush()
+
+def initServerProc(cmakeCommand, comm):
+  if comm == PIPE:
+    pipeName = getPipeName()
+    cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", 
"--experimental", "--pipe=" + pipeName])
+    attachPipe(cmakeCommand, pipeName)
+  else:
+    cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", 
"--experimental", "--debug"],
+                                    stdin=subprocess.PIPE,
+                                    stdout=subprocess.PIPE)
+    cmakeCommand.outPipe = cmakeCommand.stdout
+    cmakeCommand.inPipe = cmakeCommand.stdin
+    cmakeCommand.write = lambda val: writeAndFlush(cmakeCommand.inPipe, val)
 
   packet = waitForRawMessage(cmakeCommand)
   if packet == None:
     print("Not in server mode")
-    sys.exit(1)
+    sys.exit(2)
 
   if packet['type'] != 'hello':
     print("No hello message")
-    sys.exit(1)
+    sys.exit(3)
 
   return cmakeCommand
 
@@ -159,25 +194,27 @@ def waitForReply(cmakeCommand, originalType, cookie, 
skipProgress):
     packet = waitForRawMessage(cmakeCommand)
     t = packet['type']
     if packet['cookie'] != cookie or packet['inReplyTo'] != originalType:
-      sys.exit(1)
+      print("cookie or inReplyTo mismatch")
+      sys.exit(4)
     if t == 'message' or t == 'progress':
       if skipProgress:
         continue
     if t == 'reply':
         break
-    sys.exit(1)
+    print("Unrecognized message", packet)
+    sys.exit(5)
 
   return packet
 
 def waitForError(cmakeCommand, originalType, cookie, message):
   packet = waitForRawMessage(cmakeCommand)
   if packet['cookie'] != cookie or packet['type'] != 'error' or 
packet['inReplyTo'] != originalType or packet['errorMessage'] != message:
-    sys.exit(1)
+    sys.exit(6)
 
 def waitForProgress(cmakeCommand, originalType, cookie, current, message):
   packet = waitForRawMessage(cmakeCommand)
   if packet['cookie'] != cookie or packet['type'] != 'progress' or 
packet['inReplyTo'] != originalType or packet['progressCurrent'] != current or 
packet['progressMessage'] != message:
-    sys.exit(1)
+    sys.exit(7)
 
 def handshake(cmakeCommand, major, minor, source, build, generator, 
extraGenerator):
   version = { 'major': major }
@@ -202,9 +239,9 @@ def validateGlobalSettings(cmakeCommand, cmakeCommandPath, 
data):
   versionString = version['string']
   vs = str(version['major']) + '.' + str(version['minor']) + '.' + 
str(version['patch'])
   if (versionString != vs and not versionString.startswith(vs + '-')):
-    sys.exit(1)
+    sys.exit(8)
   if (versionString != cmakeVersion):
-    sys.exit(1)
+    sys.exit(9)
 
   # validate generators:
   generatorObjects = capabilities['generators']
@@ -237,16 +274,16 @@ def validateGlobalSettings(cmakeCommand, 
cmakeCommandPath, data):
 
   for gen in cmakeGenerators:
     if (not gen in generators):
-        sys.exit(1)
+        sys.exit(10)
 
   gen = packet['generator']
   if (gen != '' and not (gen in generators)):
-    sys.exit(1)
+    sys.exit(11)
 
   for i in data:
     print("Validating", i)
     if (packet[i] != data[i]):
-      sys.exit(1)
+      sys.exit(12)
 
 def validateCache(cmakeCommand, data):
   packet = waitForReply(cmakeCommand, 'cache', '', False)
@@ -296,8 +333,8 @@ def handleBasicMessage(proc, obj, debug):
 
 def shutdownProc(proc):
   # Tell the server to exit.
-  proc.stdin.close()
-  proc.stdout.close()
+  proc.inPipe.close()
+  proc.outPipe.close()
 
   # Wait for the server to exit.
   # If this version of python supports it, terminate the server after a 
timeout.
diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py
index f3c3fc2..701c6e9 100644
--- a/Tests/Server/server-test.py
+++ b/Tests/Server/server-test.py
@@ -19,87 +19,87 @@ if os.path.exists(buildDir):
 
 cmakelib.filterBase = sourceDir
 
-proc = cmakelib.initServerProc(cmakeCommand)
-
 with open(testFile) as f:
     testData = json.loads(f.read())
 
-for obj in testData:
-    if cmakelib.handleBasicMessage(proc, obj, debug):
-        pass
-    elif 'reply' in obj:
-        data = obj['reply']
-        if debug: print("Waiting for reply:", json.dumps(data))
-        originalType = ""
-        cookie = ""
-        skipProgress = False;
-        if 'cookie' in data: cookie = data['cookie']
-        if 'type' in data: originalType = data['type']
-        if 'skipProgress' in data: skipProgress = data['skipProgress']
-        cmakelib.waitForReply(proc, originalType, cookie, skipProgress)
-    elif 'error' in obj:
-        data = obj['error']
-        if debug: print("Waiting for error:", json.dumps(data))
-        originalType = ""
-        cookie = ""
-        message = ""
-        if 'cookie' in data: cookie = data['cookie']
-        if 'type' in data: originalType = data['type']
-        if 'message' in data: message = data['message']
-        cmakelib.waitForError(proc, originalType, cookie, message)
-    elif 'progress' in obj:
-        data = obj['progress']
-        if debug: print("Waiting for progress:", json.dumps(data))
-        originalType = ''
-        cookie = ""
-        current = 0
-        message = ""
-        if 'cookie' in data: cookie = data['cookie']
-        if 'type' in data: originalType = data['type']
-        if 'current' in data: current = data['current']
-        if 'message' in data: message = data['message']
-        cmakelib.waitForProgress(proc, originalType, cookie, current, message)
-    elif 'handshake' in obj:
-        data = obj['handshake']
-        if debug: print("Doing handshake:", json.dumps(data))
-        major = -1
-        minor = -1
-        generator = cmakeGenerator
-        extraGenerator = ''
-        sourceDirectory = sourceDir
-        buildDirectory = buildDir
-        if 'major' in data: major = data['major']
-        if 'minor' in data: minor = data['minor']
-        if 'buildDirectory' in data: buildDirectory = data['buildDirectory']
-        if 'sourceDirectory' in data: sourceDirectory = data['sourceDirectory']
-        if 'generator' in data: generator = data['generator']
-        if 'extraGenerator' in data: extraGenerator = data['extraGenerator']
-        if not os.path.isabs(buildDirectory):
-            buildDirectory = buildDir + "/" + buildDirectory
-        if sourceDirectory != '' and not os.path.isabs(sourceDirectory):
-            sourceDirectory = sourceDir + "/" + sourceDirectory
-        cmakelib.handshake(proc, major, minor, sourceDirectory, buildDirectory,
-          generator, extraGenerator)
-    elif 'validateGlobalSettings' in obj:
-        data = obj['validateGlobalSettings']
-        if not 'buildDirectory' in data: data['buildDirectory'] = buildDir
-        if not 'sourceDirectory' in data: data['sourceDirectory'] = sourceDir
-        if not 'generator' in data: data['generator'] = cmakeGenerator
-        if not 'extraGenerator' in data: data['extraGenerator'] = ''
-        cmakelib.validateGlobalSettings(proc, cmakeCommand, data)
-    elif 'validateCache' in obj:
-        data = obj['validateCache']
-        if not 'isEmpty' in data: data['isEmpty'] = false
-        cmakelib.validateCache(proc, data)
-    elif 'message' in obj:
-        print("MESSAGE:", obj["message"])
-    elif 'reconnect' in obj:
-        cmakelib.exitProc(proc)
-        proc = cmakelib.initServerProc(cmakeCommand)
-    else:
-        print("Unknown command:", json.dumps(obj))
-        sys.exit(2)
+for communicationMethod in cmakelib.communicationMethods:
+    proc = cmakelib.initServerProc(cmakeCommand, communicationMethod)
+    if proc is None:
+        continue
 
-    print("Completed")
+    for obj in testData:
+        if cmakelib.handleBasicMessage(proc, obj, debug):
+            pass
+        elif 'reply' in obj:
+            data = obj['reply']
+            if debug: print("Waiting for reply:", json.dumps(data))
+            originalType = ""
+            cookie = ""
+            skipProgress = False;
+            if 'cookie' in data: cookie = data['cookie']
+            if 'type' in data: originalType = data['type']
+            if 'skipProgress' in data: skipProgress = data['skipProgress']
+            cmakelib.waitForReply(proc, originalType, cookie, skipProgress)
+        elif 'error' in obj:
+            data = obj['error']
+            if debug: print("Waiting for error:", json.dumps(data))
+            originalType = ""
+            cookie = ""
+            message = ""
+            if 'cookie' in data: cookie = data['cookie']
+            if 'type' in data: originalType = data['type']
+            if 'message' in data: message = data['message']
+            cmakelib.waitForError(proc, originalType, cookie, message)
+        elif 'progress' in obj:
+            data = obj['progress']
+            if debug: print("Waiting for progress:", json.dumps(data))
+            originalType = ''
+            cookie = ""
+            current = 0
+            message = ""
+            if 'cookie' in data: cookie = data['cookie']
+            if 'type' in data: originalType = data['type']
+            if 'current' in data: current = data['current']
+            if 'message' in data: message = data['message']
+            cmakelib.waitForProgress(proc, originalType, cookie, current, 
message)
+        elif 'handshake' in obj:
+            data = obj['handshake']
+            if debug: print("Doing handshake:", json.dumps(data))
+            major = -1
+            minor = -1
+            generator = cmakeGenerator
+            extraGenerator = ''
+            sourceDirectory = sourceDir
+            buildDirectory = buildDir
+            if 'major' in data: major = data['major']
+            if 'minor' in data: minor = data['minor']
+            if 'buildDirectory' in data: buildDirectory = 
data['buildDirectory']
+            if 'sourceDirectory' in data: sourceDirectory = 
data['sourceDirectory']
+            if 'generator' in data: generator = data['generator']
+            if 'extraGenerator' in data: extraGenerator = 
data['extraGenerator']
 
-cmakelib.shutdownProc(proc)
+            if not os.path.isabs(buildDirectory):
+                buildDirectory = buildDir + "/" + buildDirectory
+            if sourceDirectory != '' and not os.path.isabs(sourceDirectory):
+                sourceDirectory = sourceDir + "/" + sourceDirectory
+            cmakelib.handshake(proc, major, minor, sourceDirectory, 
buildDirectory,
+                               generator, extraGenerator)
+        elif 'validateGlobalSettings' in obj:
+            data = obj['validateGlobalSettings']
+            if not 'buildDirectory' in data: data['buildDirectory'] = buildDir
+            if not 'sourceDirectory' in data: data['sourceDirectory'] = 
sourceDir
+            if not 'generator' in data: data['generator'] = cmakeGenerator
+            if not 'extraGenerator' in data: data['extraGenerator'] = ''
+            cmakelib.validateGlobalSettings(proc, cmakeCommand, data)
+        elif 'validateCache' in obj:
+            data = obj['validateCache']
+            if not 'isEmpty' in data: data['isEmpty'] = false
+            cmakelib.validateCache(proc, data)
+        elif 'reconnect' in obj:
+            cmakelib.exitProc(proc)
+            proc = cmakelib.initServerProc(cmakeCommand, communicationMethod)
+        else:
+            print("Unknown command:", json.dumps(obj))
+            sys.exit(2)
+    cmakelib.shutdownProc(proc)
+    print("Completed")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08dca58358c95a41615150513a006379c4ee7825
commit 08dca58358c95a41615150513a006379c4ee7825
Author:     Justin Berger <j.david.ber...@gmail.com>
AuthorDate: Sun Sep 3 20:09:24 2017 -0600
Commit:     Justin Berger <j.david.ber...@gmail.com>
CommitDate: Mon Oct 30 10:58:58 2017 -0600

    Tests: reworked server tests to allow other operation modes

diff --git a/Tests/Server/CMakeLists.txt b/Tests/Server/CMakeLists.txt
index 08bef0c..41d1131 100644
--- a/Tests/Server/CMakeLists.txt
+++ b/Tests/Server/CMakeLists.txt
@@ -3,10 +3,10 @@ project(Server CXX)
 
 find_package(PythonInterp REQUIRED)
 
-macro(do_test bsname file)
+macro(do_test bsname file type)
   execute_process(COMMAND ${PYTHON_EXECUTABLE}
     -B # no .pyc files
-    "${CMAKE_SOURCE_DIR}/server-test.py"
+    "${CMAKE_SOURCE_DIR}/${type}-test.py"
     "${CMAKE_COMMAND}"
     "${CMAKE_SOURCE_DIR}/${file}"
     "${CMAKE_SOURCE_DIR}"
@@ -20,9 +20,9 @@ macro(do_test bsname file)
   endif()
 endmacro()
 
-do_test("test_cache" "tc_cache.json")
-do_test("test_handshake" "tc_handshake.json")
-do_test("test_globalSettings" "tc_globalSettings.json")
-do_test("test_buildsystem1" "tc_buildsystem1.json")
+do_test("test_cache" "tc_cache.json" "server")
+do_test("test_handshake" "tc_handshake.json" "server")
+do_test("test_globalSettings" "tc_globalSettings.json" "server")
+do_test("test_buildsystem1" "tc_buildsystem1.json" "server")
 
 add_executable(Server empty.cpp)
diff --git a/Tests/Server/cmakelib.py b/Tests/Server/cmakelib.py
index 2218e02..aebc84f 100644
--- a/Tests/Server/cmakelib.py
+++ b/Tests/Server/cmakelib.py
@@ -1,5 +1,5 @@
 from __future__ import print_function
-import sys, subprocess, json
+import sys, subprocess, json, os, select
 
 termwidth = 150
 
@@ -38,6 +38,35 @@ def col_print(title, array):
   for index in range(numRows):
     print(indent + pad.join(item.ljust(maxitemwidth) for item in 
array[index::numRows]))
 
+filterPacket = lambda x: x
+
+def defaultExitWithError(proc):
+  data = ""
+  try:
+    while select.select([proc.stdout], [], [], 3.)[0]:
+      data = data + proc.stdout.read(1)
+    if len(data):
+      print("Rest of raw buffer from server:")
+      printServer(data)
+  except:
+    pass
+  proc.stdout.close()
+  proc.stdin.close()
+  proc.kill()
+  sys.exit(1)
+
+exitWithError = lambda proc: defaultExitWithError(proc)
+
+def printServer(*args):
+    print("SERVER>", *args)
+    print()
+    sys.stdout.flush()
+
+def printClient(*args):
+    print("CLIENT>", *args)
+    print()
+    sys.stdout.flush()
+
 def waitForRawMessage(cmakeCommand):
   stdoutdata = ""
   payload = ""
@@ -50,12 +79,16 @@ def waitForRawMessage(cmakeCommand):
     begin = stdoutdata.find('[== "CMake Server" ==[\n')
     end = stdoutdata.find(']== "CMake Server" ==]')
 
-    if (begin != -1 and end != -1):
+    if begin != -1 and end != -1:
       begin += len('[== "CMake Server" ==[\n')
       payload = stdoutdata[begin:end]
-      if print_communication:
-        print("\nSERVER>", json.loads(payload), "\n")
-      return json.loads(payload)
+      jsonPayload = json.loads(payload)
+      filteredPayload = filterPacket(jsonPayload)
+      if print_communication and filteredPayload:
+        printServer(filteredPayload)
+      if filteredPayload is not None or jsonPayload is None:
+          return jsonPayload
+      stdoutdata = stdoutdata[(end+len(']== "CMake Server" ==]')):]
 
 def writeRawData(cmakeCommand, content):
   writeRawData.counter += 1
@@ -71,7 +104,8 @@ def writeRawData(cmakeCommand, content):
     payload = payload.replace('\n', '\r\n')
 
   if print_communication:
-    print("\nCLIENT>", content, "(Use \\r\\n:", rn, ")\n")
+    printClient(content, "(Use \\r\\n:", rn, ")")
+
   cmakeCommand.stdin.write(payload.encode('utf-8'))
   cmakeCommand.stdin.flush()
 writeRawData.counter = 0
@@ -79,7 +113,7 @@ writeRawData.counter = 0
 def writePayload(cmakeCommand, obj):
   writeRawData(cmakeCommand, json.dumps(obj))
 
-def initProc(cmakeCommand):
+def initServerProc(cmakeCommand):
   cmakeCommand = subprocess.Popen([cmakeCommand, "-E", "server", 
"--experimental", "--debug"],
                                   stdin=subprocess.PIPE,
                                   stdout=subprocess.PIPE)
@@ -115,7 +149,8 @@ def waitForMessage(cmakeCommand, expected):
   packet = ordered(waitForRawMessage(cmakeCommand))
 
   if packet != data:
-    sys.exit(-1)
+    print ("Received unexpected message; test failed")
+    exitWithError(cmakeCommand)
   return packet
 
 def waitForReply(cmakeCommand, originalType, cookie, skipProgress):
@@ -236,3 +271,43 @@ def validateCache(cmakeCommand, data):
   if (not hadHomeDir):
     print('No CMAKE_HOME_DIRECTORY found in cache.')
     sys.exit(1)
+
+def handleBasicMessage(proc, obj, debug):
+  if 'sendRaw' in obj:
+    data = obj['sendRaw']
+    if debug: print("Sending raw:", data)
+    writeRawData(proc, data)
+    return True
+  elif 'send' in obj:
+    data = obj['send']
+    if debug: print("Sending:", json.dumps(data))
+    writePayload(proc, data)
+    return True
+  elif 'recv' in obj:
+    data = obj['recv']
+    if debug: print("Waiting for:", json.dumps(data))
+    waitForMessage(proc, data)
+    return True
+  elif 'message' in obj:
+    print("MESSAGE:", obj["message"])
+    sys.stdout.flush()
+    return True
+  return False
+
+def shutdownProc(proc):
+  # Tell the server to exit.
+  proc.stdin.close()
+  proc.stdout.close()
+
+  # Wait for the server to exit.
+  # If this version of python supports it, terminate the server after a 
timeout.
+  try:
+    proc.wait(timeout=5)
+  except TypeError:
+    proc.wait()
+  except:
+    proc.terminate()
+    raise
+
+  print('cmake-server exited: %d' % proc.returncode)
+  sys.exit(proc.returncode)
diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py
index 9380910..f3c3fc2 100644
--- a/Tests/Server/server-test.py
+++ b/Tests/Server/server-test.py
@@ -9,7 +9,7 @@ sourceDir = sys.argv[3]
 buildDir = sys.argv[4] + "/" + os.path.splitext(os.path.basename(testFile))[0]
 cmakeGenerator = sys.argv[5]
 
-print("Test:", testFile,
+print("Server Test:", testFile,
       "\n-- SourceDir:", sourceDir,
       "\n-- BuildDir:", buildDir,
       "\n-- Generator:", cmakeGenerator)
@@ -17,24 +17,16 @@ print("Test:", testFile,
 if os.path.exists(buildDir):
     shutil.rmtree(buildDir)
 
-proc = cmakelib.initProc(cmakeCommand)
+cmakelib.filterBase = sourceDir
+
+proc = cmakelib.initServerProc(cmakeCommand)
 
 with open(testFile) as f:
     testData = json.loads(f.read())
 
 for obj in testData:
-    if 'sendRaw' in obj:
-        data = obj['sendRaw']
-        if debug: print("Sending raw:", data)
-        cmakelib.writeRawData(proc, data)
-    elif 'send' in obj:
-        data = obj['send']
-        if debug: print("Sending:", json.dumps(data))
-        cmakelib.writePayload(proc, data)
-    elif 'recv' in obj:
-        data = obj['recv']
-        if debug: print("Waiting for:", json.dumps(data))
-        cmakelib.waitForMessage(proc, data)
+    if cmakelib.handleBasicMessage(proc, obj, debug):
+        pass
     elif 'reply' in obj:
         data = obj['reply']
         if debug: print("Waiting for reply:", json.dumps(data))
@@ -103,13 +95,11 @@ for obj in testData:
         print("MESSAGE:", obj["message"])
     elif 'reconnect' in obj:
         cmakelib.exitProc(proc)
-        proc = cmakelib.initProc(cmakeCommand)
+        proc = cmakelib.initServerProc(cmakeCommand)
     else:
         print("Unknown command:", json.dumps(obj))
         sys.exit(2)
 
     print("Completed")
 
-cmakelib.exitProc(proc)
-print('cmake-server exited: %d' % proc.returncode)
-sys.exit(proc.returncode)
+cmakelib.shutdownProc(proc)

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

Summary of changes:
 Help/command/add_subdirectory.rst                  |    2 +-
 Help/command/file.rst                              |    2 +-
 Help/command/install.rst                           |    2 +-
 Help/dev/testing.rst                               |    2 +-
 Help/release/3.4.rst                               |    2 +-
 Help/release/3.6.rst                               |    2 +-
 Help/release/3.7.rst                               |    2 +-
 Help/variable/LIBRARY_OUTPUT_PATH.rst              |    2 +-
 .../AndroidTestUtilities/PushToAndroidDevice.cmake |    2 +-
 Modules/CMakePackageConfigHelpers.cmake            |    2 +-
 Modules/CPackIFW.cmake                             |    4 +-
 Modules/CPackRPM.cmake                             |   14 +-
 Modules/CTest.cmake                                |    2 +-
 Modules/Compiler/IAR-FindBinUtils.cmake            |    2 +-
 Modules/Compiler/IAR.cmake                         |    2 +-
 Modules/Documentation.cmake                        |    2 +-
 Modules/FeatureSummary.cmake                       |    2 +-
 Modules/FindBZip2.cmake                            |    2 +
 Modules/FindCUDA.cmake                             |    2 +-
 Modules/FindCUDA/run_nvcc.cmake                    |    2 +-
 Modules/FindCxxTest.cmake                          |    2 +-
 Modules/FindDCMTK.cmake                            |    2 +-
 Modules/FindDevIL.cmake                            |    2 +-
 Modules/FindFLEX.cmake                             |    2 +-
 Modules/FindHDF5.cmake                             |    2 +-
 Modules/FindJNI.cmake                              |    4 +-
 Modules/FindMatlab.cmake                           |    2 +-
 Modules/FindOpenSSL.cmake                          |    2 +-
 Modules/FindTCL.cmake                              |    2 +-
 Modules/FindTclStub.cmake                          |    2 +-
 Modules/FindwxWidgets.cmake                        |    2 +-
 Modules/FindwxWindows.cmake                        |    4 +-
 Modules/ITKCompatibility.cmake                     |    2 +-
 Modules/Qt4Macros.cmake                            |    2 +-
 Modules/SquishTestScript.cmake                     |    2 +-
 Modules/UseEcos.cmake                              |    2 +-
 Modules/UseJava.cmake                              |    2 +-
 Source/CMakeLists.txt                              |    1 +
 Source/CPack/WiX/cmWIXPatchParser.cxx              |    2 +-
 Source/CPack/bills-comments.txt                    |    2 +-
 Source/CTest/cmCTestScriptHandler.cxx              |    4 +-
 Source/CTest/cmCTestSubmitHandler.cxx              |    4 +-
 Source/CTest/cmCTestTestHandler.h                  |    2 +-
 Source/CTest/cmParseGTMCoverage.cxx                |    2 +-
 Source/cmCMakeHostSystemInformationCommand.h       |    2 +-
 Source/cmCacheManager.h                            |    2 +-
 Source/cmConvertMSBuildXMLToJSON.py                |    2 +-
 Source/cmExportFileGenerator.cxx                   |    2 +-
 Source/cmFindCommon.cxx                            |    2 +-
 Source/cmFindPackageCommand.cxx                    |    2 +-
 Source/cmGlobalGenerator.cxx                       |    2 +-
 Source/cmGlobalKdevelopGenerator.cxx               |    2 +-
 Source/cmGlobalVisualStudio71Generator.cxx         |    2 +-
 Source/cmGlobalVisualStudio8Generator.cxx          |    2 +-
 Source/cmIncludeDirectoryCommand.cxx               |    2 +-
 Source/cmListFileCache.cxx                         |   13 ++
 Source/cmListFileCache.h                           |    4 +
 Source/cmMakefile.cxx                              |    2 +-
 Source/cmMakefile.h                                |    4 +-
 Source/cmMessageCommand.cxx                        |    2 +-
 Source/cmQtAutoGenerators.cxx                      |    4 +-
 Source/cmServer.cxx                                |   33 ++--
 Source/cmServer.h                                  |    3 +-
 Source/cmTargetDepend.h                            |    2 +-
 Source/cmTimestamp.cxx                             |    2 +-
 Source/cmUseMangledMesaCommand.cxx                 |    4 +-
 Source/cm_thread.hxx                               |   78 +++++++++
 Source/kwsys/Process.h.in                          |    8 +
 Source/kwsys/ProcessUNIX.c                         |    5 +
 Source/kwsys/ProcessWin32.c                        |    5 +
 Tests/CFBundleTest/np_macmain.cpp                  |    2 +-
 Tests/CMakeLists.txt                               |   53 +++---
 Tests/CTestTestStopTime/GetDate.cmake              |    2 +-
 Tests/Contracts/Home.cmake                         |   19 +++
 Tests/Contracts/Trilinos/CMakeLists.txt            |   19 +--
 .../Trilinos/{RunTest.cmake => Configure.cmake}    |    2 +-
 Tests/Contracts/Trilinos/EnvScript.cmake           |   32 ----
 Tests/Contracts/VTK/CMakeLists.txt                 |   19 +--
 .../VTK/{RunTest.cmake => Configure.cmake}         |    2 +-
 Tests/Contracts/cse-snapshot/CMakeLists.txt        |  114 -------------
 Tests/Contracts/cse-snapshot/Dashboard.cmake.in    |   76 ---------
 Tests/Contracts/cse-snapshot/RunTest.cmake         |    3 -
 Tests/FortranModules/test_preprocess.F90           |    2 +-
 Tests/FortranModules/test_preprocess_module.F90    |    2 +-
 Tests/OutOfSource/CMakeLists.txt                   |    2 +-
 Tests/RunCMake/CPack/README.txt                    |    4 +-
 Tests/RunCMake/message/RunCMakeTest.cmake          |    2 +-
 Tests/Server/CMakeLists.txt                        |   12 +-
 Tests/Server/cmakelib.py                           |  162 +++++++++++++++---
 Tests/Server/server-test.py                        |  172 +++++++++-----------
 Utilities/cmcurl/CMake/Utilities.cmake             |    2 +-
 91 files changed, 489 insertions(+), 514 deletions(-)
 create mode 100644 Source/cm_thread.hxx
 create mode 100644 Tests/Contracts/Home.cmake
 rename Tests/Contracts/Trilinos/{RunTest.cmake => Configure.cmake} (78%)
 delete mode 100644 Tests/Contracts/Trilinos/EnvScript.cmake
 rename Tests/Contracts/VTK/{RunTest.cmake => Configure.cmake} (65%)
 delete mode 100644 Tests/Contracts/cse-snapshot/CMakeLists.txt
 delete mode 100644 Tests/Contracts/cse-snapshot/Dashboard.cmake.in
 delete mode 100644 Tests/Contracts/cse-snapshot/RunTest.cmake


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to