[Cmake-commits] CMake branch, master, updated. v3.8.0-989-g6887c11

Kitware Robot kwrobot at kitware.com
Thu Apr 27 09:05:04 EDT 2017


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  6887c1174f6a16d6d51189954cb3b0dbf49a971f (commit)
       via  a7d9666d5d1c9a33ae58bb1f5a95fde57b2c69cc (commit)
       via  6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203 (commit)
       via  7402bd38714e7930810f6bd61e20b836268be814 (commit)
       via  f38147aebc19cdca17df101a9ca6a10337508485 (commit)
       via  7c31ac668986ca4753f091258321e7928b3e904a (commit)
       via  06d34c4ae73278dc208ff764badbb69f4747df1a (commit)
       via  ef205e04d4b06b4cc1456c2bca91d3859e5cb85c (commit)
       via  f4c23ee244768bc53f2e77d20a1d19b13cfd37cb (commit)
       via  493671a5212c6548b2d7376c7065f5f76692a792 (commit)
       via  d272c4d5f7c3090855683d517e987934bd7fe176 (commit)
       via  370a6b1bc525aa5b3a7308caf3347dd4b4267db0 (commit)
       via  7146a6042991ca5ac49d400cf94d0feb2b8ae4ab (commit)
       via  8fb85c68bb0090b44df22c27dabc03da63602e5e (commit)
       via  a36fb229ba04321be3d0a2472a944c05fea987e9 (commit)
       via  434f5cef657a001bcfbaa5e8b5c4fba80215efb5 (commit)
       via  6d1be6e3826a98ffbcd3bf7d951024e34d69e452 (commit)
       via  e1b67d0373b3cdc8e53836601b9b0f6372f84e70 (commit)
       via  9a740f1b595c7e68aa4670745097d2ca907513b9 (commit)
       via  a168b4ccc2b479d32455d7bb63c97a9a9d4dee68 (commit)
       via  1ef22a26c97e2661f0670b5794c47b5339b64da7 (commit)
       via  ba8571ff2deb3a29bb980e109abef0e7290de56a (commit)
       via  8ed663791bdda4e726f7b3764bc75f8856724d6f (commit)
       via  851b6c1595363c8916f24b7da8db991cf6fc3f25 (commit)
       via  25a7f14fe2ddd3555c8d8a8f33dea7abbd7061e6 (commit)
       via  ab8bbef9c6e588bc023ec8a773c78e33e3a61813 (commit)
       via  202a44a4cab0ebf2c89fb878cd2ee634fb83906c (commit)
      from  5081dfca8332957a4894bce0653c86ba1b7b2bfe (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=6887c1174f6a16d6d51189954cb3b0dbf49a971f
commit 6887c1174f6a16d6d51189954cb3b0dbf49a971f
Merge: a7d9666 370a6b1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 13:04:06 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 09:04:10 2017 -0400

    Merge topic 'elf-runpath-def'
    
    370a6b1b cmELF: Remove now-redundant check for DT_RUNPATH's existence
    7146a604 cmELF: Define DT_RUNPATH if it isn't already defined
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !764


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7d9666d5d1c9a33ae58bb1f5a95fde57b2c69cc
commit a7d9666d5d1c9a33ae58bb1f5a95fde57b2c69cc
Merge: 6cc5bf3 8ed6637
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 13:03:36 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 09:03:39 2017 -0400

    Merge topic 'UseSWIG-fallback-prefix'
    
    8ed66379 UseSWIG: Fall back to empty PREFIX for unknown languages
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !767


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203
commit 6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203
Merge: 7402bd3 f4c23ee
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 13:03:06 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 09:03:09 2017 -0400

    Merge topic 'test-install-objects-as-files'
    
    f4c23ee2 Tests: Add case for install(FILES) with TARGET_OBJECTS
    d272c4d5 Tests: Generalize RunCMake.install internal infrastructure
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !769


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7402bd38714e7930810f6bd61e20b836268be814
commit 7402bd38714e7930810f6bd61e20b836268be814
Merge: f38147a 493671a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 13:01:56 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 09:02:00 2017 -0400

    Merge topic 'cuda-device-link-ar'
    
    493671a5 CUDA: Static libraries can now explicitly resolve device symbols
    8fb85c68 CUDA: Makefile uses relative path for device linking status messages
    a36fb229 CUDA: Visual Studio now properly delays device linking
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !759


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f38147aebc19cdca17df101a9ca6a10337508485
commit f38147aebc19cdca17df101a9ca6a10337508485
Merge: 7c31ac6 434f5ce
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 13:00:12 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 09:00:15 2017 -0400

    Merge topic 'test-makefile-custom-target-includes'
    
    434f5cef Tests: Add case for IMPLICIT_DEPENDS in custom target
    6d1be6e3 Tests: Split RunCMake.BuildDepends make-only condition
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !766


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c31ac668986ca4753f091258321e7928b3e904a
commit 7c31ac668986ca4753f091258321e7928b3e904a
Merge: 06d34c4 e1b67d0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 12:58:47 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 08:58:51 2017 -0400

    Merge topic 'FindGLUT-optional-deps'
    
    e1b67d03 FindGLUT: Add library dependencies only if they exist
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !765


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06d34c4ae73278dc208ff764badbb69f4747df1a
commit 06d34c4ae73278dc208ff764badbb69f4747df1a
Merge: ef205e0 9a740f1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 12:57:24 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 08:57:30 2017 -0400

    Merge topic 'clang-tidy-2'
    
    9a740f1b cmCPackIFWInstaller: fix validation of WizardStyle option
    a168b4cc cmServerProtocol: avoid copies in range for
    1ef22a26 cmDocumentation: use ofstream local variable
    ba8571ff clang-tidy: use operators for string comparison
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !738


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef205e04d4b06b4cc1456c2bca91d3859e5cb85c
commit ef205e04d4b06b4cc1456c2bca91d3859e5cb85c
Merge: 5081dfc 851b6c1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 27 12:53:34 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Apr 27 08:55:40 2017 -0400

    Merge topic 'ctest_test-ignore-skipped-tests'
    
    851b6c15 cmCTestTestHandler: indicate why a test did not run
    25a7f14f Help: add release notes
    ab8bbef9 cmCTestTestHandler: count skipped tests as disabled
    202a44a4 cmCTestRunTest: do not count skipped tests as failed
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Reviewed-by: Craig Scott <craig.scott at crascit.com>
    Merge-request: !741


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4c23ee244768bc53f2e77d20a1d19b13cfd37cb
commit f4c23ee244768bc53f2e77d20a1d19b13cfd37cb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 26 16:17:46 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 26 16:23:12 2017 -0400

    Tests: Add case for install(FILES) with TARGET_OBJECTS

diff --git a/Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake b/Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake
new file mode 100644
index 0000000..f7f2a3a
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake
@@ -0,0 +1 @@
+check_installed([[^objs;objs/obj1(\.c)?\.(o|obj);objs/obj2(\.c)?\.(o|obj)$]])
diff --git a/Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake b/Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake
new file mode 100644
index 0000000..40c58ad
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+add_library(objs OBJECT obj1.c obj2.c)
+install(FILES $<TARGET_OBJECTS:objs> DESTINATION objs)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index e5d709b..1a60f0c 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -60,6 +60,10 @@ run_cmake(CMP0062-OLD)
 run_cmake(CMP0062-NEW)
 run_cmake(CMP0062-WARN)
 
+if(NOT RunCMake_GENERATOR STREQUAL "Xcode" OR NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
+  run_install_test(FILES-TARGET_OBJECTS)
+endif()
+
 set(run_install_test_components 1)
 run_install_test(FILES-EXCLUDE_FROM_ALL)
 run_install_test(TARGETS-EXCLUDE_FROM_ALL)
diff --git a/Tests/RunCMake/install/obj1.c b/Tests/RunCMake/install/obj1.c
new file mode 100644
index 0000000..2411aab
--- /dev/null
+++ b/Tests/RunCMake/install/obj1.c
@@ -0,0 +1,4 @@
+int obj1(void)
+{
+  return 0;
+}
diff --git a/Tests/RunCMake/install/obj2.c b/Tests/RunCMake/install/obj2.c
new file mode 100644
index 0000000..2dad71e
--- /dev/null
+++ b/Tests/RunCMake/install/obj2.c
@@ -0,0 +1,4 @@
+int obj2(void)
+{
+  return 0;
+}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=493671a5212c6548b2d7376c7065f5f76692a792
commit 493671a5212c6548b2d7376c7065f5f76692a792
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Apr 25 16:09:56 2017 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Wed Apr 26 16:18:25 2017 -0400

    CUDA: Static libraries can now explicitly resolve device symbols
    
    If a static library has the property CUDA_RESOLVE_DEVICE_SYMBOLS enabled
    it will now perform the device link step. The normal behavior is
    to delay calling device link until the static library is consumed by
    a shared library or an executable.

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 344bc09..38cc0d8 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -154,6 +154,7 @@ Properties on Targets
    /prop_tgt/CROSSCOMPILING_EMULATOR
    /prop_tgt/CUDA_PTX_COMPILATION
    /prop_tgt/CUDA_SEPARABLE_COMPILATION
+   /prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS
    /prop_tgt/CUDA_EXTENSIONS
    /prop_tgt/CUDA_STANDARD
    /prop_tgt/CUDA_STANDARD_REQUIRED
diff --git a/Help/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.rst b/Help/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.rst
new file mode 100644
index 0000000..127d79f
--- /dev/null
+++ b/Help/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.rst
@@ -0,0 +1,15 @@
+CUDA_RESOLVE_DEVICE_SYMBOLS
+---------------------------
+
+CUDA only: Enables device linking for the specific static library target
+
+If set this will enable device linking on this static library target. Normally
+device linking is deferred until a shared library or executable is generated,
+allowing for multiple static libraries to resolve device symbols at the same
+time.
+
+For instance:
+
+.. code-block:: cmake
+
+  set_property(TARGET mystaticlib PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 6789555..bf30b39 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -39,9 +39,24 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries(
       continue;
     }
 
-    if (li->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
-        li->Target->GetType() == cmStateEnums::SHARED_LIBRARY ||
-        li->Target->GetType() == cmStateEnums::MODULE_LIBRARY) {
+    bool skippable = false;
+    switch (li->Target->GetType()) {
+      case cmStateEnums::SHARED_LIBRARY:
+      case cmStateEnums::MODULE_LIBRARY:
+      case cmStateEnums::INTERFACE_LIBRARY:
+        skippable = true;
+        break;
+      case cmStateEnums::STATIC_LIBRARY:
+        // If a static library is resolving its device linking, it should
+        // be removed for other device linking
+        skippable =
+          li->Target->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS");
+        break;
+      default:
+        break;
+    }
+
+    if (skippable) {
       continue;
     }
 
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index b427495..2823977 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -127,6 +127,24 @@ void cmMakefileLibraryTargetGenerator::WriteObjectLibraryRules()
 
 void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules()
 {
+  const std::string cuda_lang("CUDA");
+  cmGeneratorTarget::LinkClosure const* closure =
+    this->GeneratorTarget->GetLinkClosure(this->ConfigName);
+
+  const bool hasCUDA =
+    (std::find(closure->Languages.begin(), closure->Languages.end(),
+               cuda_lang) != closure->Languages.end());
+
+  const bool resolveDeviceSymbols =
+    this->GeneratorTarget->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS");
+  if (hasCUDA && resolveDeviceSymbols) {
+    std::string linkRuleVar = "CMAKE_CUDA_DEVICE_LINK_LIBRARY";
+    std::string extraFlags;
+    this->LocalGenerator->AppendFlags(
+      extraFlags, this->GeneratorTarget->GetProperty("LINK_FLAGS"));
+    this->WriteDeviceLibraryRules(linkRuleVar, extraFlags, false);
+  }
+
   std::string linkLanguage =
     this->GeneratorTarget->GetLinkerLanguage(this->ConfigName);
 
@@ -861,6 +879,16 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
       std::vector<std::string> object_strings;
       this->WriteObjectsStrings(object_strings, archiveCommandLimit);
 
+      // Add the cuda device object to the list of archive files. This will
+      // only occur on archives which have CUDA_RESOLVE_DEVICE_SYMBOLS enabled
+      if (!this->DeviceLinkObject.empty()) {
+        object_strings.push_back(this->LocalGenerator->ConvertToOutputFormat(
+          this->LocalGenerator->MaybeConvertToRelativePath(
+            this->LocalGenerator->GetCurrentBinaryDirectory(),
+            this->DeviceLinkObject),
+          cmOutputConverter::SHELL));
+      }
+
       // Create the archive with the first set of objects.
       std::vector<std::string>::iterator osi = object_strings.begin();
       {
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index cfc91bd..8206083 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -447,6 +447,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeDeviceLinkCmd()
   // an executable or a dynamic library.
   std::string linkCmd;
   switch (this->GetGeneratorTarget()->GetType()) {
+    case cmStateEnums::STATIC_LIBRARY:
     case cmStateEnums::SHARED_LIBRARY:
     case cmStateEnums::MODULE_LIBRARY: {
       const std::string cudaLinkCmd(
@@ -559,11 +560,15 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
     case cmStateEnums::EXECUTABLE:
       shouldHaveDeviceLinking = true;
       break;
+    case cmStateEnums::STATIC_LIBRARY:
+      shouldHaveDeviceLinking =
+        genTarget.GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS");
+      break;
     default:
       break;
   }
 
-  if (!shouldHaveDeviceLinking || !hasCUDA) {
+  if (!(shouldHaveDeviceLinking && hasCUDA)) {
     return;
   }
 
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 9f48825..5a09718 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2563,6 +2563,10 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
     case cmStateEnums::EXECUTABLE:
       doDeviceLinking = true;
       break;
+    case cmStateEnums::STATIC_LIBRARY:
+      doDeviceLinking = this->GeneratorTarget->GetPropertyAsBool(
+        "CUDA_RESOLVE_DEVICE_SYMBOLS");
+      break;
     default:
       break;
   }
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt
index a3bd707..5f456fc 100644
--- a/Tests/CudaOnly/CMakeLists.txt
+++ b/Tests/CudaOnly/CMakeLists.txt
@@ -3,3 +3,4 @@ ADD_TEST_MACRO(CudaOnly.EnableStandard CudaOnlyEnableStandard)
 ADD_TEST_MACRO(CudaOnly.ExportPTX CudaOnlyExportPTX)
 ADD_TEST_MACRO(CudaOnly.SeparateCompilation CudaOnlySeparateCompilation)
 ADD_TEST_MACRO(CudaOnly.WithDefs CudaOnlyWithDefs)
+ADD_TEST_MACRO(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols)
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
new file mode 100644
index 0000000..b96bb98
--- /dev/null
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
@@ -0,0 +1,52 @@
+cmake_minimum_required(VERSION 3.7)
+project (CudaOnlyResolveDeviceSymbols CUDA)
+
+# Find nm and dumpbin
+if(CMAKE_NM)
+  set(dump_command ${CMAKE_NM})
+  set(dump_args -g)
+else()
+  include(GetPrerequisites)
+  message(STATUS "calling list_prerequisites to find dumpbin")
+  list_prerequisites("${CMAKE_COMMAND}" 0 0 0)
+  if(gp_dumpbin)
+    set(dump_command ${gp_dumpbin})
+    set(dump_args /ARCHIVEMEMBERS)
+  endif()
+endif()
+
+#Goal for this example:
+#Build a static library that defines multiple methods and kernels that
+#use each other.
+#Use a custom command to build an executable that uses this static library
+#We do these together to verify that we can get a static library to do
+#device symbol linking, and not have it done when the executable is made
+string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CUDA_STANDARD 11)
+
+add_library(CUDAResolveDeviceLib STATIC file1.cu file2.cu)
+set_target_properties(CUDAResolveDeviceLib
+                      PROPERTIES
+                      CUDA_SEPARABLE_COMPILATION ON
+                      CUDA_RESOLVE_DEVICE_SYMBOLS ON
+                      POSITION_INDEPENDENT_CODE ON)
+
+if(dump_command)
+add_custom_command(TARGET CUDAResolveDeviceLib POST_BUILD
+  COMMAND ${CMAKE_COMMAND}
+  -DDUMP_COMMAND=${dump_command}
+  -DDUMP_ARGS=${dump_args}
+  -DTEST_LIBRARY_PATH=$<TARGET_FILE:CUDAResolveDeviceLib>
+  -P ${CMAKE_CURRENT_SOURCE_DIR}/verify.cmake
+  )
+endif()
+
+add_executable(CudaOnlyResolveDeviceSymbols main.cu)
+target_link_libraries(CudaOnlyResolveDeviceSymbols PRIVATE CUDAResolveDeviceLib)
+
+if(APPLE)
+  # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
+  # the static cuda runtime can find it at runtime.
+  target_link_libraries(CudaOnlyResolveDeviceSymbols PRIVATE -Wl,-rpath,/usr/local/cuda/lib)
+endif()
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/file1.cu b/Tests/CudaOnly/ResolveDeviceSymbols/file1.cu
new file mode 100644
index 0000000..1ce63bf
--- /dev/null
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/file1.cu
@@ -0,0 +1,10 @@
+
+#include "file1.h"
+
+result_type __device__ file1_func(int x)
+{
+  result_type r;
+  r.input = x;
+  r.sum = x * x;
+  return r;
+}
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/file1.h b/Tests/CudaOnly/ResolveDeviceSymbols/file1.h
new file mode 100644
index 0000000..ff1945c
--- /dev/null
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/file1.h
@@ -0,0 +1,7 @@
+
+#pragma once
+struct result_type
+{
+  int input;
+  int sum;
+};
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/file2.cu b/Tests/CudaOnly/ResolveDeviceSymbols/file2.cu
new file mode 100644
index 0000000..278fd6c
--- /dev/null
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/file2.cu
@@ -0,0 +1,25 @@
+
+#include "file2.h"
+
+result_type __device__ file1_func(int x);
+
+result_type_dynamic __device__ file2_func(int x)
+{
+  const result_type r = file1_func(x);
+  const result_type_dynamic rd{ r.input, r.sum, true };
+  return rd;
+}
+
+static __global__ void file2_kernel(result_type_dynamic& r, int x)
+{
+  // call static_func which is a method that is defined in the
+  // static library that is always out of date
+  r = file2_func(x);
+}
+
+int file2_launch_kernel(int x)
+{
+  result_type_dynamic r;
+  file2_kernel<<<1, 1>>>(r, x);
+  return r.sum;
+}
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/file2.h b/Tests/CudaOnly/ResolveDeviceSymbols/file2.h
new file mode 100644
index 0000000..d2dbaa4
--- /dev/null
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/file2.h
@@ -0,0 +1,10 @@
+
+#pragma once
+#include "file1.h"
+
+struct result_type_dynamic
+{
+  int input;
+  int sum;
+  bool from_static;
+};
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/main.cu b/Tests/CudaOnly/ResolveDeviceSymbols/main.cu
new file mode 100644
index 0000000..b4b5b9e
--- /dev/null
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/main.cu
@@ -0,0 +1,85 @@
+
+#include <iostream>
+
+#include "file1.h"
+#include "file2.h"
+
+int file2_launch_kernel(int x);
+
+result_type_dynamic __device__ file2_func(int x);
+static __global__ void main_kernel(result_type_dynamic& r, int x)
+{
+  // call function that was not device linked to us, this will cause
+  // a runtime failure of "invalid device function"
+  r = file2_func(x);
+}
+
+int main_launch_kernel(int x)
+{
+  result_type_dynamic r;
+  main_kernel<<<1, 1>>>(r, x);
+  return r.sum;
+}
+
+int choose_cuda_device()
+{
+  int nDevices = 0;
+  cudaError_t err = cudaGetDeviceCount(&nDevices);
+  if (err != cudaSuccess) {
+    std::cerr << "Failed to retrieve the number of CUDA enabled devices"
+              << std::endl;
+    return 1;
+  }
+  for (int i = 0; i < nDevices; ++i) {
+    cudaDeviceProp prop;
+    cudaError_t err = cudaGetDeviceProperties(&prop, i);
+    if (err != cudaSuccess) {
+      std::cerr << "Could not retrieve properties from CUDA device " << i
+                << std::endl;
+      return 1;
+    }
+    std::cout << "prop.major: " << prop.major << std::endl;
+    if (prop.major >= 3) {
+      err = cudaSetDevice(i);
+      if (err != cudaSuccess) {
+        std::cout << "Could not select CUDA device " << i << std::endl;
+      } else {
+        return 0;
+      }
+    }
+  }
+
+  std::cout << "Could not find a CUDA enabled card supporting compute >=3.0"
+            << std::endl;
+
+  return 1;
+}
+
+int main(int argc, char** argv)
+{
+  int ret = choose_cuda_device();
+  if (ret) {
+    return 0;
+  }
+
+  cudaError_t err;
+  file2_launch_kernel(42);
+  err = cudaGetLastError();
+  if (err != cudaSuccess) {
+    std::cerr << "file2_launch_kernel: kernel launch failed: "
+              << cudaGetErrorString(err) << std::endl;
+    return 1;
+  }
+
+  main_launch_kernel(1);
+  err = cudaGetLastError();
+  if (err == cudaSuccess) {
+    // This kernel launch should fail as the file2_func was device linked
+    // into the static library and is not usable by the executable
+    std::cerr << "main_launch_kernel: kernel launch should have failed"
+              << std::endl;
+    return 1;
+  }
+
+  return 0;
+}
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/verify.cmake b/Tests/CudaOnly/ResolveDeviceSymbols/verify.cmake
new file mode 100644
index 0000000..94d388b
--- /dev/null
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/verify.cmake
@@ -0,0 +1,14 @@
+execute_process(COMMAND ${DUMP_COMMAND} ${DUMP_ARGS} ${TEST_LIBRARY_PATH}
+  RESULT_VARIABLE RESULT
+  OUTPUT_VARIABLE OUTPUT
+  ERROR_VARIABLE ERROR
+)
+
+if(NOT "${RESULT}" STREQUAL "0")
+  message(FATAL_ERROR "${DUMP_COMMAND} failed [${RESULT}] [${OUTPUT}] [${ERROR}]")
+endif()
+
+if(NOT "${OUTPUT}" MATCHES "(cmake_device_link|device-link)")
+  message(FATAL_ERROR
+    "No cuda device objects found, device linking did not occur")
+endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d272c4d5f7c3090855683d517e987934bd7fe176
commit d272c4d5f7c3090855683d517e987934bd7fe176
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 26 16:16:04 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 26 16:16:04 2017 -0400

    Tests: Generalize RunCMake.install internal infrastructure
    
    Allow `run_install_test` to be used for simpler cases.

diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 45693b5..e5d709b 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -13,12 +13,15 @@ function(run_install_test case)
   # Check "all" components.
   set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-all)
   run_cmake_command(${case}-all ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -P cmake_install.cmake)
-  # Check unspecified component.
-  set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-uns)
-  run_cmake_command(${case}-uns ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=Unspecified -P cmake_install.cmake)
-  # Check explicit component.
-  set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-exc)
-  run_cmake_command(${case}-exc ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=exc -P cmake_install.cmake)
+
+  if(run_install_test_components)
+    # Check unspecified component.
+    set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-uns)
+    run_cmake_command(${case}-uns ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=Unspecified -P cmake_install.cmake)
+    # Check explicit component.
+    set(CMAKE_INSTALL_PREFIX ${RunCMake_TEST_BINARY_DIR}/root-exc)
+    run_cmake_command(${case}-exc ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DBUILD_TYPE=Debug -DCOMPONENT=exc -P cmake_install.cmake)
+  endif()
 endfunction()
 
 # Function called in *-check.cmake scripts to check installed files.
@@ -57,5 +60,6 @@ run_cmake(CMP0062-OLD)
 run_cmake(CMP0062-NEW)
 run_cmake(CMP0062-WARN)
 
+set(run_install_test_components 1)
 run_install_test(FILES-EXCLUDE_FROM_ALL)
 run_install_test(TARGETS-EXCLUDE_FROM_ALL)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=370a6b1bc525aa5b3a7308caf3347dd4b4267db0
commit 370a6b1bc525aa5b3a7308caf3347dd4b4267db0
Author:     Maya Rashish <coypu at sdf.org>
AuthorDate: Wed Apr 26 16:43:40 2017 +0300
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 26 14:01:24 2017 -0400

    cmELF: Remove now-redundant check for DT_RUNPATH's existence
    
    We define it if it's not already defined.

diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 084cf4a..d23abec 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -157,11 +157,7 @@ public:
   // Lookup the RUNPATH in the DYNAMIC section.
   StringEntry const* GetRunPath()
   {
-#if defined(DT_RUNPATH)
     return this->GetDynamicSectionString(DT_RUNPATH);
-#else
-    return 0;
-#endif
   }
 
   // Return the recorded ELF type.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7146a6042991ca5ac49d400cf94d0feb2b8ae4ab
commit 7146a6042991ca5ac49d400cf94d0feb2b8ae4ab
Author:     Maya Rashish <coypu at sdf.org>
AuthorDate: Wed Apr 26 16:37:28 2017 +0300
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 26 14:00:58 2017 -0400

    cmELF: Define DT_RUNPATH if it isn't already defined
    
    The value of 29 is used by binutils and is used in the System V ABI
    draft from 2001.
    
    It isn't defined on NetBSD 6.0.

diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 2a8137f..084cf4a 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -44,6 +44,9 @@ typedef struct Elf32_Rela Elf32_Rela;
 #ifdef _SCO_DS
 #include <link.h> // For DT_SONAME etc.
 #endif
+#ifndef DT_RUNPATH
+#define DT_RUNPATH 29
+#endif
 
 // Low-level byte swapping implementation.
 template <size_t s>

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8fb85c68bb0090b44df22c27dabc03da63602e5e
commit 8fb85c68bb0090b44df22c27dabc03da63602e5e
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Apr 25 09:44:53 2017 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Wed Apr 26 11:41:22 2017 -0400

    CUDA: Makefile uses relative path for device linking status messages

diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index a93b42d..a719887 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -122,7 +122,11 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule(
     std::string buildEcho = "Linking ";
     buildEcho += linkLanguage;
     buildEcho += " device code ";
-    buildEcho += targetOutputReal;
+    buildEcho += this->LocalGenerator->ConvertToOutputFormat(
+      this->LocalGenerator->MaybeConvertToRelativePath(
+        this->LocalGenerator->GetCurrentBinaryDirectory(),
+        this->DeviceLinkObject),
+      cmOutputConverter::SHELL);
     this->LocalGenerator->AppendEcho(
       commands, buildEcho, cmLocalUnixMakefileGenerator3::EchoLink, &progress);
   }
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index e017b29..b427495 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -292,8 +292,12 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules(
     cmLocalUnixMakefileGenerator3::EchoProgress progress;
     this->MakeEchoProgress(progress);
     // Add the link message.
-    std::string buildEcho = "Linking " + linkLanguage + " device code";
-    buildEcho += targetOutputReal;
+    std::string buildEcho = "Linking " + linkLanguage + " device code ";
+    buildEcho += this->LocalGenerator->ConvertToOutputFormat(
+      this->LocalGenerator->MaybeConvertToRelativePath(
+        this->LocalGenerator->GetCurrentBinaryDirectory(),
+        this->DeviceLinkObject),
+      cmOutputConverter::SHELL);
     this->LocalGenerator->AppendEcho(
       commands, buildEcho, cmLocalUnixMakefileGenerator3::EchoLink, &progress);
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a36fb229ba04321be3d0a2472a944c05fea987e9
commit a36fb229ba04321be3d0a2472a944c05fea987e9
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Apr 25 16:01:09 2017 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Wed Apr 26 11:41:22 2017 -0400

    CUDA: Visual Studio now properly delays device linking

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index d83662e..9f48825 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -116,6 +116,10 @@ cmVisualStudio10TargetGenerator::~cmVisualStudio10TargetGenerator()
        i != this->CudaOptions.end(); ++i) {
     delete i->second;
   }
+  for (OptionsMap::iterator i = this->CudaLinkOptions.begin();
+       i != this->CudaLinkOptions.end(); ++i) {
+    delete i->second;
+  }
   if (!this->BuildFileStream) {
     return;
   }
@@ -213,6 +217,9 @@ void cmVisualStudio10TargetGenerator::Generate()
     if (!this->ComputeCudaOptions()) {
       return;
     }
+    if (!this->ComputeCudaLinkOptions()) {
+      return;
+    }
     if (!this->ComputeMasmOptions()) {
       return;
     }
@@ -2524,6 +2531,66 @@ void cmVisualStudio10TargetGenerator::WriteCudaOptions(
   this->WriteString("</CudaCompile>\n", 2);
 }
 
+bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions()
+{
+  if (!this->GlobalGenerator->IsCudaEnabled()) {
+    return true;
+  }
+  for (std::vector<std::string>::const_iterator i =
+         this->Configurations.begin();
+       i != this->Configurations.end(); ++i) {
+    if (!this->ComputeCudaLinkOptions(*i)) {
+      return false;
+    }
+  }
+  return true;
+}
+
+bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
+  std::string const& configName)
+{
+  cmGlobalVisualStudio10Generator* gg =
+    static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator);
+  CM_AUTO_PTR<Options> pOptions(new Options(
+    this->LocalGenerator, Options::CudaCompiler, gg->GetCudaFlagTable()));
+  Options& cudaLinkOptions = *pOptions;
+
+  // Determine if we need to do a device link
+  bool doDeviceLinking = false;
+  switch (this->GeneratorTarget->GetType()) {
+    case cmStateEnums::SHARED_LIBRARY:
+    case cmStateEnums::MODULE_LIBRARY:
+    case cmStateEnums::EXECUTABLE:
+      doDeviceLinking = true;
+      break;
+    default:
+      break;
+  }
+
+  cudaLinkOptions.AddFlag("PerformDeviceLink",
+                          doDeviceLinking ? "true" : "false");
+
+  this->CudaLinkOptions[configName] = pOptions.release();
+  return true;
+}
+
+void cmVisualStudio10TargetGenerator::WriteCudaLinkOptions(
+  std::string const& configName)
+{
+  if (this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) {
+    return;
+  }
+
+  if (!this->MSTools || !this->GlobalGenerator->IsCudaEnabled()) {
+    return;
+  }
+
+  this->WriteString("<CudaLink>\n", 2);
+  Options& cudaLinkOptions = *(this->CudaLinkOptions[configName]);
+  cudaLinkOptions.OutputFlagMap(*this->BuildFileStream, "      ");
+  this->WriteString("</CudaLink>\n", 2);
+}
+
 bool cmVisualStudio10TargetGenerator::ComputeMasmOptions()
 {
   if (!this->GlobalGenerator->IsMasmEnabled()) {
@@ -3283,6 +3350,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
     }
     //    output link flags       <Link></Link>
     this->WriteLinkOptions(*i);
+    this->WriteCudaLinkOptions(*i);
     //    output lib flags       <Lib></Lib>
     this->WriteLibOptions(*i);
     //    output manifest flags  <Manifest></Manifest>
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index bd270bf..6106615 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -101,6 +101,11 @@ private:
   bool ComputeCudaOptions(std::string const& config);
   void WriteCudaOptions(std::string const& config,
                         std::vector<std::string> const& includes);
+
+  bool ComputeCudaLinkOptions();
+  bool ComputeCudaLinkOptions(std::string const& config);
+  void WriteCudaLinkOptions(std::string const& config);
+
   bool ComputeMasmOptions();
   bool ComputeMasmOptions(std::string const& config);
   void WriteMasmOptions(std::string const& config,
@@ -154,6 +159,7 @@ private:
   OptionsMap ClOptions;
   OptionsMap RcOptions;
   OptionsMap CudaOptions;
+  OptionsMap CudaLinkOptions;
   OptionsMap MasmOptions;
   OptionsMap NasmOptions;
   OptionsMap LinkOptions;
diff --git a/Tests/Cuda/Complex/dynamic.cu b/Tests/Cuda/Complex/dynamic.cu
index f677868..a76973d 100644
--- a/Tests/Cuda/Complex/dynamic.cu
+++ b/Tests/Cuda/Complex/dynamic.cu
@@ -37,7 +37,7 @@ EXPORT int choose_cuda_device()
                 << std::endl;
       return 1;
     }
-    if (prop.major >= 4) {
+    if (prop.major >= 3) {
       err = cudaSetDevice(i);
       if (err != cudaSuccess) {
         std::cout << "Could not select CUDA device " << i << std::endl;
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
index 420d7a9..0a2542a 100644
--- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
+++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
@@ -12,6 +12,7 @@ project (CudaOnlySeparateCompilation CUDA)
 string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CUDA_STANDARD 11)
+
 add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu)
 
 #Having file4/file5 in a shared library causes serious problems
@@ -22,12 +23,24 @@ add_library(CUDASeparateLibB STATIC file4.cu file5.cu)
 target_link_libraries(CUDASeparateLibB PRIVATE CUDASeparateLibA)
 
 add_executable(CudaOnlySeparateCompilation main.cu)
-target_link_libraries(CudaOnlySeparateCompilation PRIVATE CUDASeparateLibB)
+target_link_libraries(CudaOnlySeparateCompilation
+                      PRIVATE CUDASeparateLibB)
+
+set_target_properties(CUDASeparateLibA
+                      CUDASeparateLibB
+                      PROPERTIES CUDA_SEPARABLE_COMPILATION ON
+                      POSITION_INDEPENDENT_CODE ON)
 
-set_target_properties( CUDASeparateLibA
-                       CUDASeparateLibB
-                       PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
+if (CMAKE_GENERATOR MATCHES "^Visual Studio")
+  #Visual Studio CUDA integration will not perform device linking
+  #on a target that itself does not have GenerateRelocatableDeviceCode
+  #enabled.
+  set_target_properties(CudaOnlySeparateCompilation
+                        PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
+endif()
 
-set_target_properties( CUDASeparateLibA
-                       CUDASeparateLibB
-                       PROPERTIES POSITION_INDEPENDENT_CODE ON)
+if (APPLE)
+  # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
+  # the static cuda runtime can find it at runtime.
+  target_link_libraries(CudaOnlySeparateCompilation PRIVATE -Wl,-rpath,/usr/local/cuda/lib)
+endif()
diff --git a/Tests/CudaOnly/SeparateCompilation/main.cu b/Tests/CudaOnly/SeparateCompilation/main.cu
index 03e0921..40dbe5d 100644
--- a/Tests/CudaOnly/SeparateCompilation/main.cu
+++ b/Tests/CudaOnly/SeparateCompilation/main.cu
@@ -7,9 +7,62 @@
 int file4_launch_kernel(int x);
 int file5_launch_kernel(int x);
 
+int choose_cuda_device()
+{
+  int nDevices = 0;
+  cudaError_t err = cudaGetDeviceCount(&nDevices);
+  if (err != cudaSuccess) {
+    std::cerr << "Failed to retrieve the number of CUDA enabled devices"
+              << std::endl;
+    return 1;
+  }
+  for (int i = 0; i < nDevices; ++i) {
+    cudaDeviceProp prop;
+    cudaError_t err = cudaGetDeviceProperties(&prop, i);
+    if (err != cudaSuccess) {
+      std::cerr << "Could not retrieve properties from CUDA device " << i
+                << std::endl;
+      return 1;
+    }
+    if (prop.major >= 3) {
+      err = cudaSetDevice(i);
+      if (err != cudaSuccess) {
+        std::cout << "Could not select CUDA device " << i << std::endl;
+      } else {
+        return 0;
+      }
+    }
+  }
+
+  std::cout << "Could not find a CUDA enabled card supporting compute >=3.0"
+            << std::endl;
+
+  return 1;
+}
+
 int main(int argc, char** argv)
 {
+  int ret = choose_cuda_device();
+  if (ret) {
+    return 0;
+  }
+
+  cudaError_t err;
   file4_launch_kernel(42);
+  err = cudaGetLastError();
+  if (err != cudaSuccess) {
+    std::cerr << "file4_launch_kernel: kernel launch failed: "
+              << cudaGetErrorString(err) << std::endl;
+    return 1;
+  }
+
   file5_launch_kernel(42);
+  err = cudaGetLastError();
+  if (err != cudaSuccess) {
+    std::cerr << "file5_launch_kernel: kernel launch failed: "
+              << cudaGetErrorString(err) << std::endl;
+    return 1;
+  }
+
   return 0;
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=434f5cef657a001bcfbaa5e8b5c4fba80215efb5
commit 434f5cef657a001bcfbaa5e8b5c4fba80215efb5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 26 08:35:11 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 26 08:46:11 2017 -0400

    Tests: Add case for IMPLICIT_DEPENDS in custom target
    
    Use the `IMPLICIT_DEPENDS` option of `add_custom_command` and place the
    command in a custom target.  Verify that `INCLUDE_DIRECTORIES` of that
    custom target are honored.  This is a case that was not really designed
    to work but happens to work, is useful, and makes sense.  Add a test
    case make sure it continues to work.
    
    Issue: #16830

diff --git a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake
new file mode 100644
index 0000000..0f92e0e
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake
@@ -0,0 +1,13 @@
+add_custom_command(
+  OUTPUT output.cxx
+  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/MakeCustomIncludes.cxx output.cxx
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MakeCustomIncludes.cxx
+  IMPLICIT_DEPENDS CXX ${CMAKE_CURRENT_SOURCE_DIR}/MakeCustomIncludes.cxx)
+add_custom_target(generate ALL DEPENDS output.cxx)
+set_property(TARGET generate PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR})
+
+file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+set(check_pairs
+  \"${CMAKE_CURRENT_BINARY_DIR}/output.cxx|${CMAKE_CURRENT_BINARY_DIR}/MakeCustomIncludes.h\"
+  )
+")
diff --git a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cxx b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cxx
new file mode 100644
index 0000000..9a0edef
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cxx
@@ -0,0 +1,6 @@
+#include "MakeCustomIncludes.h"
+
+int main()
+{
+  return MakeCustomIncludes();
+}
diff --git a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.step1.cmake b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.step1.cmake
new file mode 100644
index 0000000..6bb01a6
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.step1.cmake
@@ -0,0 +1,3 @@
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/MakeCustomIncludes.h" [[
+inline int MakeCustomIncludes() { return 1; }
+]])
diff --git a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.step2.cmake b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.step2.cmake
new file mode 100644
index 0000000..6b3151d
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.step2.cmake
@@ -0,0 +1,3 @@
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/MakeCustomIncludes.h" [[
+inline int MakeCustomIncludes() { return 2; }
+]])
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 736ecff..9941c70 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -44,6 +44,7 @@ run_BuildDepends(Custom-Symbolic-and-Byproduct)
 run_BuildDepends(Custom-Always)
 
 if(RunCMake_GENERATOR MATCHES "Make")
+  run_BuildDepends(MakeCustomIncludes)
   if(NOT "${RunCMake_BINARY_DIR}" STREQUAL "${RunCMake_SOURCE_DIR}")
     run_BuildDepends(MakeInProjectOnly)
   endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d1be6e3826a98ffbcd3bf7d951024e34d69e452
commit 6d1be6e3826a98ffbcd3bf7d951024e34d69e452
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 26 08:34:16 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 26 08:34:16 2017 -0400

    Tests: Split RunCMake.BuildDepends make-only condition

diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 67a6101..736ecff 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -43,9 +43,10 @@ endif()
 run_BuildDepends(Custom-Symbolic-and-Byproduct)
 run_BuildDepends(Custom-Always)
 
-if(RunCMake_GENERATOR MATCHES "Make" AND
-   NOT "${RunCMake_BINARY_DIR}" STREQUAL "${RunCMake_SOURCE_DIR}")
-  run_BuildDepends(MakeInProjectOnly)
+if(RunCMake_GENERATOR MATCHES "Make")
+  if(NOT "${RunCMake_BINARY_DIR}" STREQUAL "${RunCMake_SOURCE_DIR}")
+    run_BuildDepends(MakeInProjectOnly)
+  endif()
 endif()
 
 function(run_ReGeneration)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1b67d0373b3cdc8e53836601b9b0f6372f84e70
commit e1b67d0373b3cdc8e53836601b9b0f6372f84e70
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 26 08:14:08 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 26 08:14:08 2017 -0400

    FindGLUT: Add library dependencies only if they exist
    
    Fixes: #14060

diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 02e6df0..88d4b29 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -120,10 +120,12 @@ if (GLUT_FOUND)
   # If not, we need some way to figure out what platform we are on.
   set( GLUT_LIBRARIES
     ${GLUT_glut_LIBRARY}
-    ${GLUT_Xmu_LIBRARY}
-    ${GLUT_Xi_LIBRARY}
-    ${GLUT_cocoa_LIBRARY}
     )
+  foreach(v GLUT_Xmu_LIBRARY GLUT_Xi_LIBRARY GLUT_cocoa_LIBRARY)
+    if(${v})
+      list(APPEND GLUT_LIBRARIES ${${v}})
+    endif()
+  endforeach()
 
   if(NOT TARGET GLUT::GLUT)
     add_library(GLUT::GLUT UNKNOWN IMPORTED)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a740f1b595c7e68aa4670745097d2ca907513b9
commit 9a740f1b595c7e68aa4670745097d2ca907513b9
Author:     Konstantin Podsvirov <konstantin at podsvirov.pro>
AuthorDate: Fri Apr 21 20:54:50 2017 +0200
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Wed Apr 26 08:59:57 2017 +0200

    cmCPackIFWInstaller: fix validation of WizardStyle option

diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 664048d..5e5f066 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -171,16 +171,17 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
 
   // WizardStyle
   if (const char* option = GetOption("CPACK_IFW_PACKAGE_WIZARD_STYLE")) {
-    if (WizardStyle == "Modern" && WizardStyle == "Aero" &&
-        WizardStyle == "Mac" && WizardStyle == "Classic") {
+    // Setting the user value in any case
+    WizardStyle = option;
+    // Check known values
+    if (WizardStyle != "Modern" && WizardStyle != "Aero" &&
+        WizardStyle != "Mac" && WizardStyle != "Classic") {
       cmCPackLogger(
         cmCPackLog::LOG_WARNING,
         "Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
           << option << "\". Expected values are: Modern, Aero, Mac, Classic."
           << std::endl);
     }
-
-    WizardStyle = option;
   }
 
   // WizardDefaultWidth

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a168b4ccc2b479d32455d7bb63c97a9a9d4dee68
commit a168b4ccc2b479d32455d7bb63c97a9a9d4dee68
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Fri Apr 21 19:19:29 2017 +0200
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Wed Apr 26 08:59:56 2017 +0200

    cmServerProtocol: avoid copies in range for

diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 8227ab7..11ee897 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -50,9 +50,8 @@ std::vector<std::string> getConfigurations(const cmake* cm)
 bool hasString(const Json::Value& v, const std::string& s)
 {
   return !v.isNull() &&
-    std::find_if(v.begin(), v.end(), [s](const Json::Value& i) {
-      return i.asString() == s;
-    }) != v.end();
+    std::any_of(v.begin(), v.end(),
+                [s](const Json::Value& i) { return i.asString() == s; });
 }
 
 template <class T>
@@ -493,16 +492,14 @@ cmServerResponse cmServerProtocol1_0::ProcessCache(
   if (keys.empty()) {
     keys = allKeys;
   } else {
-    for (auto i : keys) {
-      if (std::find_if(allKeys.begin(), allKeys.end(),
-                       [i](const std::string& j) { return i == j; }) ==
-          allKeys.end()) {
+    for (const auto& i : keys) {
+      if (std::find(allKeys.begin(), allKeys.end(), i) == allKeys.end()) {
         return request.ReportError("Key \"" + i + "\" not found in cache.");
       }
     }
   }
   std::sort(keys.begin(), keys.end());
-  for (auto key : keys) {
+  for (const auto& key : keys) {
     Json::Value entry = Json::objectValue;
     entry[kKEY_KEY] = key;
     entry[kTYPE_KEY] =
@@ -511,7 +508,7 @@ cmServerResponse cmServerProtocol1_0::ProcessCache(
 
     Json::Value props = Json::objectValue;
     bool haveProperties = false;
-    for (auto prop : state->GetCacheEntryPropertyList(key)) {
+    for (const auto& prop : state->GetCacheEntryPropertyList(key)) {
       haveProperties = true;
       props[prop] = state->GetCacheEntryProperty(key, prop);
     }
@@ -598,7 +595,7 @@ bool LanguageData::operator==(const LanguageData& other) const
 void LanguageData::SetDefines(const std::set<std::string>& defines)
 {
   std::vector<std::string> result;
-  for (auto i : defines) {
+  for (const auto& i : defines) {
     result.push_back(i);
   }
   std::sort(result.begin(), result.end());
@@ -615,11 +612,11 @@ struct hash<LanguageData>
     using std::hash;
     size_t result =
       hash<std::string>()(in.Language) ^ hash<std::string>()(in.Flags);
-    for (auto i : in.IncludePathList) {
+    for (const auto& i : in.IncludePathList) {
       result = result ^ (hash<std::string>()(i.first) ^
                          (i.second ? std::numeric_limits<size_t>::max() : 0));
     }
-    for (auto i : in.Defines) {
+    for (const auto& i : in.Defines) {
       result = result ^ hash<std::string>()(i);
     }
     result =
@@ -643,7 +640,7 @@ static Json::Value DumpSourceFileGroup(const LanguageData& data,
     }
     if (!data.IncludePathList.empty()) {
       Json::Value includes = Json::arrayValue;
-      for (auto i : data.IncludePathList) {
+      for (const auto& i : data.IncludePathList) {
         Json::Value tmp = Json::objectValue;
         tmp[kPATH_KEY] = i.first;
         if (i.second) {
@@ -661,7 +658,7 @@ static Json::Value DumpSourceFileGroup(const LanguageData& data,
   result[kIS_GENERATED_KEY] = data.IsGenerated;
 
   Json::Value sourcesValue = Json::arrayValue;
-  for (auto i : files) {
+  for (const auto& i : files) {
     const std::string relPath =
       cmSystemTools::RelativePath(baseDir.c_str(), i.c_str());
     sourcesValue.append(relPath.size() < i.size() ? relPath : i);
@@ -819,7 +816,7 @@ static Json::Value DumpTarget(cmGeneratorTarget* target,
   std::set<std::string> languages;
   target->GetLanguages(languages, config);
   std::map<std::string, LanguageData> languageDataMap;
-  for (auto lang : languages) {
+  for (const auto& lang : languages) {
     LanguageData& ld = languageDataMap[lang];
     ld.Language = lang;
     lg->GetTargetCompileFlags(target, config, lang, ld.Flags);
@@ -1095,7 +1092,7 @@ cmServerResponse cmServerProtocol1_0::ProcessSetGlobalSettings(
     kWARN_UNINITIALIZED_KEY, kWARN_UNUSED_KEY, kWARN_UNUSED_CLI_KEY,
     kCHECK_SYSTEM_VARS_KEY
   };
-  for (auto i : boolValues) {
+  for (const auto& i : boolValues) {
     if (!request.Data[i].isNull() && !request.Data[i].isBool()) {
       return request.ReportError("\"" + i +
                                  "\" must be unset or a bool value.");

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ef22a26c97e2661f0670b5794c47b5339b64da7
commit 1ef22a26c97e2661f0670b5794c47b5339b64da7
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Fri Apr 21 19:19:29 2017 +0200
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Wed Apr 26 08:59:56 2017 +0200

    cmDocumentation: use ofstream local variable

diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 5f25113..c6286b3 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -129,28 +129,19 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
     this->CurrentArgument = i->Argument;
     // If a file name was given, use it.  Otherwise, default to the
     // given stream.
-    cmsys::ofstream* fout = CM_NULLPTR;
+    cmsys::ofstream fout;
     std::ostream* s = &os;
     if (!i->Filename.empty()) {
-      fout = new cmsys::ofstream(i->Filename.c_str());
-      if (fout) {
-        s = fout;
-      } else {
-        result = false;
-      }
+      fout.open(i->Filename.c_str());
+      s = &fout;
     } else if (++count > 1) {
       os << "\n\n";
     }
 
     // Print this documentation type to the stream.
-    if (!this->PrintDocumentation(i->HelpType, *s) || !*s) {
+    if (!this->PrintDocumentation(i->HelpType, *s) || s->fail()) {
       result = false;
     }
-
-    // Close the file if we wrote one.
-    if (fout) {
-      delete fout;
-    }
   }
   return result;
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba8571ff2deb3a29bb980e109abef0e7290de56a
commit ba8571ff2deb3a29bb980e109abef0e7290de56a
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Fri Apr 21 19:19:29 2017 +0200
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Wed Apr 26 08:59:56 2017 +0200

    clang-tidy: use operators for string comparison

diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 57b47f1..664048d 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -171,9 +171,8 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
 
   // WizardStyle
   if (const char* option = GetOption("CPACK_IFW_PACKAGE_WIZARD_STYLE")) {
-    if (WizardStyle.compare("Modern") == 0 &&
-        WizardStyle.compare("Aero") == 0 && WizardStyle.compare("Mac") == 0 &&
-        WizardStyle.compare("Classic") == 0) {
+    if (WizardStyle == "Modern" && WizardStyle == "Aero" &&
+        WizardStyle == "Mac" && WizardStyle == "Classic") {
       cmCPackLogger(
         cmCPackLog::LOG_WARNING,
         "Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index 99e8b9e..eda383f 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -514,11 +514,11 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
     Default.clear();
   } else if (const char* value = GetOption(option)) {
     std::string lowerValue = cmsys::SystemTools::LowerCase(value);
-    if (lowerValue.compare("true") == 0) {
+    if (lowerValue == "true") {
       Default = "true";
-    } else if (lowerValue.compare("false") == 0) {
+    } else if (lowerValue == "false") {
       Default = "false";
-    } else if (lowerValue.compare("script") == 0) {
+    } else if (lowerValue == "script") {
       Default = "script";
     } else {
       Default = value;
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 167fecf..c5a4faa 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1727,7 +1727,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
     // bcc crashes if we attempt a normal substring comparison,
     // hence the following workaround
     std::string fileNameSubstring = fileName.substr(0, pattern.length());
-    if (fileNameSubstring.compare(pattern) != 0) {
+    if (fileNameSubstring != pattern) {
       continue;
     }
     if (logName == "") {
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b8a5293..cb11060 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3153,7 +3153,7 @@ void cmMakefile::EnableLanguage(std::vector<std::string> const& lang,
   langs.reserve(lang.size());
   for (std::vector<std::string>::const_iterator i = lang.begin();
        i != lang.end(); ++i) {
-    if (i->compare("RC") == 0) {
+    if (*i == "RC") {
       langsRC.push_back(*i);
     } else {
       langs.push_back(*i);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ed663791bdda4e726f7b3764bc75f8856724d6f
commit 8ed663791bdda4e726f7b3764bc75f8856724d6f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 25 08:52:14 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 25 08:52:14 2017 -0400

    UseSWIG: Fall back to empty PREFIX for unknown languages
    
    Teach `SWIG_ADD_LIBRARY` to fall back to an empty library prefix for
    languages we don't explicitly define already.
    
    Suggested-by: Alan W. Irwin <irwin at beluga.phys.uvic.ca>

diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 277f4ca..bfe1a6f 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -326,6 +326,9 @@ macro(SWIG_ADD_LIBRARY name)
     if (APPLE)
       set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".bundle")
     endif ()
+  else()
+    # assume empty prefix because we expect the module to be dynamically loaded
+    set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
   endif ()
 endmacro()
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=851b6c1595363c8916f24b7da8db991cf6fc3f25
commit 851b6c1595363c8916f24b7da8db991cf6fc3f25
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Apr 21 15:51:14 2017 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Apr 24 15:42:40 2017 -0400

    cmCTestTestHandler: indicate why a test did not run

diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index f059ff1..d3ec9a4 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -523,17 +523,22 @@ int cmCTestTestHandler::ProcessHandler()
     if (!disabledTests.empty()) {
       cmGeneratedFileStream ofs;
       cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
-                   << "The following tests are disabled and did not run:"
-                   << std::endl);
+                   << "The following tests did not run:" << std::endl);
       this->StartLogFile("TestsDisabled", ofs);
 
+      const char* disabled_reason;
       for (std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator dtit =
              disabledTests.begin();
            dtit != disabledTests.end(); ++dtit) {
         ofs << dtit->TestCount << ":" << dtit->Name << std::endl;
+        if (dtit->CompletionStatus == "Disabled") {
+          disabled_reason = "Disabled";
+        } else {
+          disabled_reason = "Skipped";
+        }
         cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t"
                      << std::setw(3) << dtit->TestCount << " - " << dtit->Name
-                     << std::endl);
+                     << " (" << disabled_reason << ")" << std::endl);
       }
     }
 
diff --git a/Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt
index ee0dc51..9449e65 100644
--- a/Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt
+++ b/Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt
@@ -7,5 +7,5 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- CleanupTest
+The following tests did not run:
+.*2 \- CleanupTest \(Disabled\)
diff --git a/Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt
index e2c9f92..486722e 100644
--- a/Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt
+++ b/Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt
@@ -2,8 +2,8 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*3 \- DisabledFailingTest
+The following tests did not run:
+.*3 \- DisabledFailingTest \(Disabled\)
 +
 The following tests FAILED:
 .*2 \- FailingTest \(Failed\)
diff --git a/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt
index d8bf966..9078aeb 100644
--- a/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt
+++ b/Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt
@@ -10,8 +10,8 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- DisabledTest
+The following tests did not run:
+.*2 \- DisabledTest \(Disabled\)
 +
 The following tests FAILED:
 .*3 - NotRunTest \(Not Run\)
diff --git a/Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt
index 886efb8..10d385e 100644
--- a/Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt
+++ b/Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt
@@ -9,5 +9,5 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- DisabledTest
+The following tests did not run:
+.*2 \- DisabledTest \(Disabled\)
diff --git a/Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt
index dc27950..2dfd10d 100644
--- a/Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt
+++ b/Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt
@@ -9,5 +9,5 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- DisabledTest
+The following tests did not run:
+.*2 \- DisabledTest \(Disabled\)
diff --git a/Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt b/Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt
index d8bf966..9078aeb 100644
--- a/Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt
+++ b/Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt
@@ -10,8 +10,8 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- DisabledTest
+The following tests did not run:
+.*2 \- DisabledTest \(Disabled\)
 +
 The following tests FAILED:
 .*3 - NotRunTest \(Not Run\)
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt
index e010eb2..3b14b7a 100644
--- a/Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt
+++ b/Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt
@@ -7,5 +7,5 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- CleanupTest
+The following tests did not run:
+.*2 \- CleanupTest \(Skipped\)
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt
index 8fa9a2c..8ecc6e3 100644
--- a/Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt
+++ b/Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt
@@ -9,5 +9,5 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- SkipTest
+The following tests did not run:
+.*2 \- SkipTest \(Skipped\)
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt
index 175d51a..fe9bf34 100644
--- a/Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt
+++ b/Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt
@@ -9,5 +9,5 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- SkipTest
+The following tests did not run:
+.*2 \- SkipTest \(Skipped\)
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt
index bdaf744..52e7a0b 100644
--- a/Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt
+++ b/Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt
@@ -7,5 +7,5 @@
 +
 Total Test time \(real\) = +[0-9.]+ sec
 +
-The following tests are disabled and did not run:
-.*2 \- SkipTest
+The following tests did not run:
+.*2 \- SkipTest \(Skipped\)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25a7f14fe2ddd3555c8d8a8f33dea7abbd7061e6
commit 25a7f14fe2ddd3555c8d8a8f33dea7abbd7061e6
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Apr 21 15:56:09 2017 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Apr 24 15:42:40 2017 -0400

    Help: add release notes

diff --git a/Help/release/dev/ctest_test-ignore-skipped-tests.rst b/Help/release/dev/ctest_test-ignore-skipped-tests.rst
new file mode 100644
index 0000000..1e2486c
--- /dev/null
+++ b/Help/release/dev/ctest_test-ignore-skipped-tests.rst
@@ -0,0 +1,7 @@
+ctest_test-ignore-skipped-tests
+-------------------------------
+
+* When running tests, CTest learned to treat skipped tests (using the
+  :prop_test:`SKIP_RETURN_CODE` property) the same as tests with the
+  :prop_test:`DISABLED` property. Due to this change, CTest will not indicate
+  failure when all tests are either skipped or pass.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab8bbef9c6e588bc023ec8a773c78e33e3a61813
commit ab8bbef9c6e588bc023ec8a773c78e33e3a61813
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Apr 21 13:46:09 2017 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Apr 24 15:42:40 2017 -0400

    cmCTestTestHandler: count skipped tests as disabled
    
    The `Skipped` status is basically a runtime version of the `Disabled`
    status (set as a property on the test by the configure step), so treat
    them the same.

diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index dafeec2..f059ff1 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -17,6 +17,7 @@
 #include <string.h>
 #include <time.h>
 
+#include "cmAlgorithms.h"
 #include "cmCTest.h"
 #include "cmCTestBatchTestHandler.h"
 #include "cmCTestMultiProcessHandler.h"
@@ -495,7 +496,8 @@ int cmCTestTestHandler::ProcessHandler()
 
     for (SetOfTests::iterator ftit = resultsSet.begin();
          ftit != resultsSet.end(); ++ftit) {
-      if (ftit->CompletionStatus == "Disabled") {
+      if (cmHasLiteralPrefix(ftit->CompletionStatus, "SKIP_RETURN_CODE=") ||
+          ftit->CompletionStatus == "Disabled") {
         disabledTests.push_back(*ftit);
       }
     }
@@ -544,6 +546,7 @@ int cmCTestTestHandler::ProcessHandler()
       for (SetOfTests::iterator ftit = resultsSet.begin();
            ftit != resultsSet.end(); ++ftit) {
         if (ftit->Status != cmCTestTestHandler::COMPLETED &&
+            !cmHasLiteralPrefix(ftit->CompletionStatus, "SKIP_RETURN_CODE=") &&
             ftit->CompletionStatus != "Disabled") {
           ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
           cmCTestLog(
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 32c4be8..0d9baec 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -204,6 +204,7 @@ add_RunCMake_test(ctest_start)
 add_RunCMake_test(ctest_submit)
 add_RunCMake_test(ctest_test)
 add_RunCMake_test(ctest_disabled_test)
+add_RunCMake_test(ctest_skipped_test)
 add_RunCMake_test(ctest_upload)
 add_RunCMake_test(ctest_fixtures)
 add_RunCMake_test(file)
diff --git a/Tests/RunCMake/ctest_skipped_test/CMakeLists.txt.in b/Tests/RunCMake/ctest_skipped_test/CMakeLists.txt.in
new file mode 100644
index 0000000..cc4b8ed
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/CMakeLists.txt.in
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 3.8)
+project(@CASE_NAME@ C)
+include(CTest)
+
+if (WIN32)
+  set(skip_command "@CMAKE_CURRENT_LIST_DIR@/skip.bat")
+else ()
+  set(skip_command "@CMAKE_CURRENT_LIST_DIR@/skip.sh")
+endif ()
+
+add_test(NAME SuccessfulTest COMMAND "${CMAKE_COMMAND}" --version)
+ at CASE_CMAKELISTS_SUFFIX_CODE@
diff --git a/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in
new file mode 100644
index 0000000..c0d7e42
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in
@@ -0,0 +1 @@
+set(CTEST_PROJECT_NAME "@CASE_NAME@")
diff --git a/Tests/RunCMake/ctest_skipped_test/RunCMakeTest.cmake b/Tests/RunCMake/ctest_skipped_test/RunCMakeTest.cmake
new file mode 100644
index 0000000..dcf5cd4
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/RunCMakeTest.cmake
@@ -0,0 +1,51 @@
+include(RunCTest)
+
+function(run_SkipTest)
+  set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(NAME SkipTest COMMAND ${skip_command})
+
+set_tests_properties(SkipTest PROPERTIES SKIP_RETURN_CODE 125)
+  ]])
+  run_ctest(SkipTest)
+endfunction()
+run_SkipTest()
+
+function(run_SkipSetupTest)
+  set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(NAME SkipTest COMMAND ${skip_command})
+add_test(NAME SuccessfulCleanupTest COMMAND "${CMAKE_COMMAND}" --version)
+
+set_tests_properties(SkipTest PROPERTIES SKIP_RETURN_CODE 125
+                                         FIXTURES_SETUP "Foo")
+set_tests_properties(SuccessfulTest PROPERTIES FIXTURES_REQUIRED "Foo")
+set_tests_properties(SuccessfulCleanupTest PROPERTIES FIXTURES_CLEANUP "Foo")
+  ]])
+  run_ctest(SkipSetupTest)
+endfunction()
+run_SkipSetupTest()
+
+function(run_SkipRequiredTest)
+  set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(NAME SkipTest COMMAND ${skip_command})
+add_test(NAME SuccessfulCleanupTest COMMAND "${CMAKE_COMMAND}" --version)
+
+set_tests_properties(SuccessfulTest PROPERTIES FIXTURES_SETUP "Foo")
+set_tests_properties(SkipTest PROPERTIES SKIP_RETURN_CODE 125
+                                         FIXTURES_REQUIRED "Foo")
+set_tests_properties(SuccessfulCleanupTest PROPERTIES FIXTURES_CLEANUP "Foo")
+  ]])
+  run_ctest(SkipRequiredTest)
+endfunction()
+run_SkipRequiredTest()
+
+function(run_SkipCleanupTest)
+  set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(NAME CleanupTest COMMAND ${skip_command})
+
+set_tests_properties(SuccessfulTest PROPERTIES FIXTURES_REQUIRED "Foo")
+set_tests_properties(CleanupTest PROPERTIES SKIP_RETURN_CODE 125
+                                            FIXTURES_CLEANUP "Foo")
+  ]])
+  run_ctest(SkipCleanupTest)
+endfunction()
+run_SkipCleanupTest()
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt
new file mode 100644
index 0000000..e010eb2
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt
@@ -0,0 +1,11 @@
+    Start 1: SuccessfulTest
+1/2 Test #1: SuccessfulTest ...................   Passed +[0-9.]+ sec
+    Start 2: CleanupTest
+2/2 Test #2: CleanupTest ......................\*\*\*\Skipped +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 2
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests are disabled and did not run:
+.*2 \- CleanupTest
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt
new file mode 100644
index 0000000..8fa9a2c
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt
@@ -0,0 +1,13 @@
+    Start 1: SuccessfulTest
+1/3 Test #1: SuccessfulTest ...................   Passed +[0-9.]+ sec
+    Start 2: SkipTest
+2/3 Test #2: SkipTest .........................\*\*\*\Skipped +[0-9.]+ sec
+    Start 3: SuccessfulCleanupTest
+3/3 Test #3: SuccessfulCleanupTest ............   Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 3
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests are disabled and did not run:
+.*2 \- SkipTest
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt
new file mode 100644
index 0000000..175d51a
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt
@@ -0,0 +1,13 @@
+    Start 2: SkipTest
+1/3 Test #2: SkipTest .........................\*\*\*\Skipped +[0-9.]+ sec
+    Start 1: SuccessfulTest
+2/3 Test #1: SuccessfulTest ...................   Passed +[0-9.]+ sec
+    Start 3: SuccessfulCleanupTest
+3/3 Test #3: SuccessfulCleanupTest ............   Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 3
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests are disabled and did not run:
+.*2 \- SkipTest
diff --git a/Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt b/Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt
new file mode 100644
index 0000000..bdaf744
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt
@@ -0,0 +1,11 @@
+    Start 1: SuccessfulTest
+1/2 Test #1: SuccessfulTest ...................   Passed +[0-9.]+ sec
+    Start 2: SkipTest
+2/2 Test #2: SkipTest .........................\*\*\*\Skipped +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 2
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests are disabled and did not run:
+.*2 \- SkipTest
diff --git a/Tests/RunCMake/ctest_skipped_test/skip.bat b/Tests/RunCMake/ctest_skipped_test/skip.bat
new file mode 100755
index 0000000..80e1290
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/skip.bat
@@ -0,0 +1 @@
+EXIT 125
diff --git a/Tests/RunCMake/ctest_skipped_test/skip.sh b/Tests/RunCMake/ctest_skipped_test/skip.sh
new file mode 100755
index 0000000..f9c4603
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/skip.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exit 125
diff --git a/Tests/RunCMake/ctest_skipped_test/test.cmake.in b/Tests/RunCMake/ctest_skipped_test/test.cmake.in
new file mode 100644
index 0000000..ca23c83
--- /dev/null
+++ b/Tests/RunCMake/ctest_skipped_test/test.cmake.in
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.7)
+
+set(CTEST_SITE                          "test-site")
+set(CTEST_BUILD_NAME                    "test-build-name")
+set(CTEST_SOURCE_DIRECTORY              "@RunCMake_BINARY_DIR@/@CASE_NAME@")
+set(CTEST_BINARY_DIRECTORY              "@RunCMake_BINARY_DIR@/@CASE_NAME at -build")
+set(CTEST_CMAKE_GENERATOR               "@RunCMake_GENERATOR@")
+set(CTEST_CMAKE_GENERATOR_PLATFORM      "@RunCMake_GENERATOR_PLATFORM@")
+set(CTEST_CMAKE_GENERATOR_TOOLSET       "@RunCMake_GENERATOR_TOOLSET@")
+set(CTEST_BUILD_CONFIGURATION           "$ENV{CMAKE_CONFIG_TYPE}")
+
+set(ctest_test_args "@CASE_CTEST_TEST_ARGS@")
+ctest_start(Experimental)
+ctest_configure()
+ctest_build()
+ctest_test(${ctest_test_args})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=202a44a4cab0ebf2c89fb878cd2ee634fb83906c
commit 202a44a4cab0ebf2c89fb878cd2ee634fb83906c
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Apr 21 14:26:21 2017 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Apr 21 16:39:41 2017 -0400

    cmCTestRunTest: do not count skipped tests as failed
    
    Skipped tests are neither passed nor failed tests, but return codes are
    based only upon failed tests, so do not count them as such.
    
    Fixes #16822.

diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index a4853b7..fe23075 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -167,6 +167,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
   std::vector<std::pair<cmsys::RegularExpression, std::string> >::iterator
     passIt;
   bool forceFail = false;
+  bool skipped = false;
   bool outputTestErrorsToConsole = false;
   if (!this->TestProperties->RequiredRegularExpressions.empty() &&
       this->FailedDependencies.empty()) {
@@ -219,6 +220,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
       s << "SKIP_RETURN_CODE=" << this->TestProperties->SkipReturnCode;
       this->TestResult.CompletionStatus = s.str();
       cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Skipped ");
+      skipped = true;
     } else if ((success && !this->TestProperties->WillFail) ||
                (!success && this->TestProperties->WillFail)) {
       this->TestResult.Status = cmCTestTestHandler::COMPLETED;
@@ -338,7 +340,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
       compress ? this->CompressedOutput : this->ProcessOutput;
     this->TestResult.CompressOutput = compress;
     this->TestResult.ReturnValue = this->TestProcess->GetExitValue();
-    this->TestResult.CompletionStatus = "Completed";
+    if (!skipped) {
+      this->TestResult.CompletionStatus = "Completed";
+    }
     this->TestResult.ExecutionTime = this->TestProcess->GetTotalTime();
     this->MemCheckPostProcess();
     this->ComputeWeightedCost();
@@ -349,7 +353,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
     this->TestHandler->TestResults.push_back(this->TestResult);
   }
   delete this->TestProcess;
-  return passed;
+  return passed || skipped;
 }
 
 bool cmCTestRunTest::StartAgain()

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

Summary of changes:
 Help/manual/cmake-properties.7.rst                 |    1 +
 Help/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.rst      |   15 ++++
 .../dev/ctest_test-ignore-skipped-tests.rst        |    7 ++
 Modules/FindGLUT.cmake                             |    8 +-
 Modules/UseSWIG.cmake                              |    3 +
 Source/CPack/IFW/cmCPackIFWInstaller.cxx           |   10 +--
 Source/CPack/IFW/cmCPackIFWPackage.cxx             |    6 +-
 Source/CTest/cmCTestRunTest.cxx                    |    8 +-
 Source/CTest/cmCTestTestHandler.cxx                |   18 +++--
 Source/cmDocumentation.cxx                         |   17 +---
 Source/cmELF.cxx                                   |    7 +-
 Source/cmLinkLineDeviceComputer.cxx                |   21 ++++-
 Source/cmMakefile.cxx                              |    2 +-
 Source/cmMakefileExecutableTargetGenerator.cxx     |    6 +-
 Source/cmMakefileLibraryTargetGenerator.cxx        |   36 ++++++++-
 Source/cmNinjaNormalTargetGenerator.cxx            |    7 +-
 Source/cmServerProtocol.cxx                        |   29 +++----
 Source/cmVisualStudio10TargetGenerator.cxx         |   72 +++++++++++++++++
 Source/cmVisualStudio10TargetGenerator.h           |    6 ++
 Tests/Cuda/Complex/dynamic.cu                      |    2 +-
 Tests/CudaOnly/CMakeLists.txt                      |    1 +
 Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt |   52 ++++++++++++
 .../ResolveDeviceSymbols}/file1.cu                 |    0
 .../ResolveDeviceSymbols}/file1.h                  |    0
 Tests/CudaOnly/ResolveDeviceSymbols/file2.cu       |   25 ++++++
 .../ResolveDeviceSymbols}/file2.h                  |    0
 Tests/CudaOnly/ResolveDeviceSymbols/main.cu        |   85 ++++++++++++++++++++
 Tests/CudaOnly/ResolveDeviceSymbols/verify.cmake   |   14 ++++
 Tests/CudaOnly/SeparateCompilation/CMakeLists.txt  |   27 +++++--
 Tests/CudaOnly/SeparateCompilation/main.cu         |   53 ++++++++++++
 .../RunCMake/BuildDepends/MakeCustomIncludes.cmake |   13 +++
 Tests/RunCMake/BuildDepends/MakeCustomIncludes.cxx |    6 ++
 .../BuildDepends/MakeCustomIncludes.step1.cmake    |    3 +
 .../BuildDepends/MakeCustomIncludes.step2.cmake    |    3 +
 Tests/RunCMake/BuildDepends/RunCMakeTest.cmake     |    8 +-
 Tests/RunCMake/CMakeLists.txt                      |    1 +
 .../DisableCleanupTest-stdout.txt                  |    4 +-
 .../DisableFailingTest-stdout.txt                  |    4 +-
 .../DisableNotRunTest-stdout.txt                   |    4 +-
 .../DisableRequiredTest-stdout.txt                 |    4 +-
 .../DisableSetupTest-stdout.txt                    |    4 +-
 .../ctest_disabled_test/DisabledTest-stdout.txt    |    4 +-
 .../RunCMake/ctest_skipped_test/CMakeLists.txt.in  |   12 +++
 .../CTestConfig.cmake.in                           |    0
 .../RunCMake/ctest_skipped_test/RunCMakeTest.cmake |   51 ++++++++++++
 .../ctest_skipped_test/SkipCleanupTest-stdout.txt  |   11 +++
 .../SkipRequiredTest-stdout.txt}                   |   10 +--
 .../SkipSetupTest-stdout.txt}                      |   10 +--
 .../ctest_skipped_test/SkipTest-stdout.txt         |   11 +++
 Tests/RunCMake/ctest_skipped_test/skip.bat         |    1 +
 Tests/RunCMake/ctest_skipped_test/skip.sh          |    3 +
 .../test.cmake.in                                  |    0
 .../install/FILES-TARGET_OBJECTS-all-check.cmake   |    1 +
 Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake  |    3 +
 Tests/RunCMake/install/RunCMakeTest.cmake          |   20 +++--
 Tests/RunCMake/install/obj1.c                      |    4 +
 Tests/RunCMake/install/obj2.c                      |    4 +
 57 files changed, 639 insertions(+), 98 deletions(-)
 create mode 100644 Help/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.rst
 create mode 100644 Help/release/dev/ctest_test-ignore-skipped-tests.rst
 create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
 copy Tests/{Cuda/Complex => CudaOnly/ResolveDeviceSymbols}/file1.cu (100%)
 copy Tests/{Cuda/Complex => CudaOnly/ResolveDeviceSymbols}/file1.h (100%)
 create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/file2.cu
 copy Tests/{Cuda/Complex => CudaOnly/ResolveDeviceSymbols}/file2.h (100%)
 create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/main.cu
 create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/verify.cmake
 create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake
 create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.cxx
 create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.step1.cmake
 create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.step2.cmake
 create mode 100644 Tests/RunCMake/ctest_skipped_test/CMakeLists.txt.in
 copy Tests/RunCMake/{ctest_disabled_test => ctest_skipped_test}/CTestConfig.cmake.in (100%)
 create mode 100644 Tests/RunCMake/ctest_skipped_test/RunCMakeTest.cmake
 create mode 100644 Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt
 copy Tests/RunCMake/{ctest_disabled_test/DisableRequiredTest-stdout.txt => ctest_skipped_test/SkipRequiredTest-stdout.txt} (52%)
 copy Tests/RunCMake/{ctest_disabled_test/DisableSetupTest-stdout.txt => ctest_skipped_test/SkipSetupTest-stdout.txt} (52%)
 create mode 100644 Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt
 create mode 100755 Tests/RunCMake/ctest_skipped_test/skip.bat
 create mode 100755 Tests/RunCMake/ctest_skipped_test/skip.sh
 copy Tests/RunCMake/{ctest_disabled_test => ctest_skipped_test}/test.cmake.in (100%)
 create mode 100644 Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake
 create mode 100644 Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake
 create mode 100644 Tests/RunCMake/install/obj1.c
 create mode 100644 Tests/RunCMake/install/obj2.c


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list