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  8496d11ef8a5c4a14a13c7df5e7f214028c35f5c (commit)
       via  1f72f409ee85bfa4cb95701ebd237302989bcf85 (commit)
       via  640bc9def4fae15cde11674e1220fd0cc6320bbd (commit)
       via  124472e9fc66446224b306406b96ab2aaf9bcc3f (commit)
       via  843d55de295b0eeca2a028badde3b2f9a409cc72 (commit)
       via  52b1419040ef1ec2c51029f39f0b517a173d580e (commit)
       via  b1fd2bbe75bac249ce19f5a89ac06ff0bd38741c (commit)
       via  41eab150a8ef42bbebff18ff84652e9da1ef4e75 (commit)
       via  88c7abb7409c235d411c4cc899377385b91075e2 (commit)
      from  74005a136ca0f6ffa1619982d2a4c947335d7254 (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=8496d11ef8a5c4a14a13c7df5e7f214028c35f5c
commit 8496d11ef8a5c4a14a13c7df5e7f214028c35f5c
Merge: 1f72f40 843d55d
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Apr 4 15:14:29 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Apr 4 11:14:36 2018 -0400

    Merge topic 'android-no-libstdc++'
    
    843d55de29 Android: Suppress implicit -lstdc++ linker flag
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1919


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f72f409ee85bfa4cb95701ebd237302989bcf85
commit 1f72f409ee85bfa4cb95701ebd237302989bcf85
Merge: 640bc9d 52b1419
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Apr 4 15:12:38 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Apr 4 11:13:38 2018 -0400

    Merge topic 'typo-in-release-script'
    
    52b1419040 Utilities/Release: Remove extra colon from release scripts
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1914


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=640bc9def4fae15cde11674e1220fd0cc6320bbd
commit 640bc9def4fae15cde11674e1220fd0cc6320bbd
Merge: 124472e 41eab15
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Apr 4 15:12:13 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Apr 4 11:12:52 2018 -0400

    Merge topic 'cuda_support_system_libraries_with_device_symbols'
    
    41eab150a8 CUDA: Pass more link libraries to device linking
    88c7abb740 CUDA: Pass host linker directories to device linker
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1634


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=124472e9fc66446224b306406b96ab2aaf9bcc3f
commit 124472e9fc66446224b306406b96ab2aaf9bcc3f
Merge: 74005a1 b1fd2bb
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Apr 4 15:05:36 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Apr 4 11:06:02 2018 -0400

    Merge topic 'FindPython-stabilization'
    
    b1fd2bbe75 FindPython: enhance multiple major versions lookup
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1915


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=843d55de295b0eeca2a028badde3b2f9a409cc72
commit 843d55de295b0eeca2a028badde3b2f9a409cc72
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Apr 3 11:31:59 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Apr 3 14:34:57 2018 -0400

    Android: Suppress implicit -lstdc++ linker flag
    
    The chosen STL libraries are already linked explicitly so we shouldn't
    let the compiler add its implicit `-lstdc++` (the default) when invoking
    the linker.
    
    Fixes: #17863
    NDK-Issue: https://github.com/android-ndk/ndk/issues/105
    Inspired-by: Tom Hughes <tomtheengin...@gmail.com>

diff --git a/Modules/Platform/Android-Clang-CXX.cmake 
b/Modules/Platform/Android-Clang-CXX.cmake
index 7111836..85d5088 100644
--- a/Modules/Platform/Android-Clang-CXX.cmake
+++ b/Modules/Platform/Android-Clang-CXX.cmake
@@ -1,2 +1,9 @@
 include(Platform/Android-Clang)
 __android_compiler_clang(CXX)
+if(_ANDROID_STL_NOSTDLIBXX)
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6)
+    string(APPEND CMAKE_CXX_STANDARD_LIBRARIES " -nostdlib++")
+  else()
+    string(APPEND CMAKE_CXX_STANDARD_LIBRARIES " -nodefaultlibs -lgcc -lc -lm 
-ldl")
+  endif()
+endif()
diff --git a/Modules/Platform/Android-GNU-CXX.cmake 
b/Modules/Platform/Android-GNU-CXX.cmake
index 41279d1..d30d0ff 100644
--- a/Modules/Platform/Android-GNU-CXX.cmake
+++ b/Modules/Platform/Android-GNU-CXX.cmake
@@ -1,2 +1,5 @@
 include(Platform/Android-GNU)
 __android_compiler_gnu(CXX)
+if(_ANDROID_STL_NOSTDLIBXX)
+  string(APPEND CMAKE_CXX_STANDARD_LIBRARIES " -nodefaultlibs -lgcc -lc -lm 
-ldl")
+endif()
diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake 
b/Modules/Platform/Android/ndk-stl-c++.cmake
index a12411c..1cafd1f 100644
--- a/Modules/Platform/Android/ndk-stl-c++.cmake
+++ b/Modules/Platform/Android/ndk-stl-c++.cmake
@@ -1,6 +1,7 @@
 # <ndk>/sources/cxx-stl/llvm-libc++/Android.mk
 set(_ANDROID_STL_RTTI 1)
 set(_ANDROID_STL_EXCEPTIONS 1)
+set(_ANDROID_STL_NOSTDLIBXX 1)
 macro(__android_stl_cxx lang filename)
   # Add the include directory.
   if(EXISTS 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef")
diff --git a/Modules/Platform/Android/ndk-stl-gabi++.cmake 
b/Modules/Platform/Android/ndk-stl-gabi++.cmake
index 850a47a..d3b9e45 100644
--- a/Modules/Platform/Android/ndk-stl-gabi++.cmake
+++ b/Modules/Platform/Android/ndk-stl-gabi++.cmake
@@ -1,6 +1,7 @@
 # <ndk>/sources/cxx-stl/gabi++/Android.mk
 set(_ANDROID_STL_RTTI 1)
 set(_ANDROID_STL_EXCEPTIONS 1)
+set(_ANDROID_STL_NOSTDLIBXX 1)
 macro(__android_stl_gabixx lang filename)
   __android_stl_inc(${lang} 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/gabi++/include" 1)
   __android_stl_lib(${lang} 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/gabi++/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}"
 1)
diff --git a/Modules/Platform/Android/ndk-stl-gnustl.cmake 
b/Modules/Platform/Android/ndk-stl-gnustl.cmake
index b3226ee..46cedc6 100644
--- a/Modules/Platform/Android/ndk-stl-gnustl.cmake
+++ b/Modules/Platform/Android/ndk-stl-gnustl.cmake
@@ -1,6 +1,7 @@
 # <ndk>/sources/cxx-stl/gnu-libstdc++/Android.mk
 set(_ANDROID_STL_RTTI 1)
 set(_ANDROID_STL_EXCEPTIONS 1)
+set(_ANDROID_STL_NOSTDLIBXX 1)
 macro(__android_stl_gnustl lang filename)
   __android_stl_inc(${lang} 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${CMAKE_${lang}_ANDROID_TOOLCHAIN_VERSION}/include"
 1)
   __android_stl_inc(${lang} 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${CMAKE_${lang}_ANDROID_TOOLCHAIN_VERSION}/libs/${CMAKE_ANDROID_ARCH_ABI}/include"
 1)
diff --git a/Modules/Platform/Android/ndk-stl-none.cmake 
b/Modules/Platform/Android/ndk-stl-none.cmake
index 9049c91..45122f7 100644
--- a/Modules/Platform/Android/ndk-stl-none.cmake
+++ b/Modules/Platform/Android/ndk-stl-none.cmake
@@ -1,2 +1,3 @@
+set(_ANDROID_STL_NOSTDLIBXX 1)
 macro(__android_stl lang)
 endmacro()
diff --git a/Modules/Platform/Android/ndk-stl-stlport.cmake 
b/Modules/Platform/Android/ndk-stl-stlport.cmake
index eab6b94..efad33b 100644
--- a/Modules/Platform/Android/ndk-stl-stlport.cmake
+++ b/Modules/Platform/Android/ndk-stl-stlport.cmake
@@ -1,6 +1,7 @@
 # <ndk>/sources/cxx-stl/stlport/Android.mk
 set(_ANDROID_STL_RTTI 1)
 set(_ANDROID_STL_EXCEPTIONS 1)
+set(_ANDROID_STL_NOSTDLIBXX 0)
 macro(__android_stl_stlport lang filename)
   __android_stl_inc(${lang} 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/stlport/stlport" 1)
   __android_stl_lib(${lang} 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/stlport/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}"
 1)
diff --git a/Modules/Platform/Android/ndk-stl-system.cmake 
b/Modules/Platform/Android/ndk-stl-system.cmake
index dd554fe..7d86a40 100644
--- a/Modules/Platform/Android/ndk-stl-system.cmake
+++ b/Modules/Platform/Android/ndk-stl-system.cmake
@@ -1,6 +1,7 @@
 # <ndk>/android-ndk-r11c/sources/cxx-stl/system/Android.mk
 set(_ANDROID_STL_RTTI 0)
 set(_ANDROID_STL_EXCEPTIONS 0)
+set(_ANDROID_STL_NOSTDLIBXX 0)
 macro(__android_stl lang)
   __android_stl_inc(${lang} 
"${CMAKE_ANDROID_NDK}/sources/cxx-stl/system/include" 1)
 endmacro()
diff --git a/Tests/RunCMake/Android/android_lib.cxx 
b/Tests/RunCMake/Android/android_lib.cxx
new file mode 100644
index 0000000..82f9d27
--- /dev/null
+++ b/Tests/RunCMake/Android/android_lib.cxx
@@ -0,0 +1,4 @@
+int android_lib()
+{
+  return 0;
+}
diff --git a/Tests/RunCMake/Android/check_binary.cmake 
b/Tests/RunCMake/Android/check_binary.cmake
new file mode 100644
index 0000000..1d1b01a
--- /dev/null
+++ b/Tests/RunCMake/Android/check_binary.cmake
@@ -0,0 +1,8 @@
+if(NOT EXISTS "${file}")
+  message(FATAL_ERROR "Missing file:\n  ${file}")
+endif()
+execute_process(COMMAND "${objdump}" -p ${file} OUTPUT_VARIABLE out)
+if(out MATCHES "NEEDED[^\n]*stdc\\+\\+")
+  string(REPLACE "\n" "\n  " out "  ${out}")
+  message(FATAL_ERROR "File:\n  ${file}\ndepends on libstdc++:\n${out}")
+endif()
diff --git a/Tests/RunCMake/Android/common.cmake 
b/Tests/RunCMake/Android/common.cmake
index 015f202..f931be1 100644
--- a/Tests/RunCMake/Android/common.cmake
+++ b/Tests/RunCMake/Android/common.cmake
@@ -92,6 +92,23 @@ if(CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a")
 endif()
 add_executable(android_c android.c)
 add_executable(android_cxx android.cxx)
+add_library(android_cxx_lib SHARED android_lib.cxx)
+
+set(objdump "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}objdump")
+if(NOT EXISTS "${objdump}")
+  message(FATAL_ERROR "Expected tool missing:\n  ${objdump}")
+endif()
+
+if(NOT CMAKE_ANDROID_STL_TYPE MATCHES 
"^(system|stlport_static|stlport_shared)$")
+  foreach(tgt android_cxx android_cxx_lib)
+    add_custom_command(TARGET ${tgt} POST_BUILD
+      COMMAND ${CMAKE_COMMAND}
+        -Dobjdump=${objdump}
+        -Dfile=$<TARGET_FILE:${tgt}>
+        -P ${CMAKE_CURRENT_SOURCE_DIR}/check_binary.cmake
+      )
+  endforeach()
+endif()
 
 # Test that an explicit /usr/include is ignored in favor of
 # appearing as a standard include directory at the end.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52b1419040ef1ec2c51029f39f0b517a173d580e
commit 52b1419040ef1ec2c51029f39f0b517a173d580e
Author:     Jean-Christophe Fillion-Robin <jchris.filli...@kitware.com>
AuthorDate: Mon Apr 2 16:16:28 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Apr 3 14:11:38 2018 -0400

    Utilities/Release: Remove extra colon from release scripts
    
    The type of the `BUILD_QtDialog` cache entry is `BOOL`, not `BOOL:`.

diff --git a/Utilities/Release/linux64_release.cmake 
b/Utilities/Release/linux64_release.cmake
index 97fc33c..2fd4f12 100644
--- a/Utilities/Release/linux64_release.cmake
+++ b/Utilities/Release/linux64_release.cmake
@@ -34,7 +34,7 @@ OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.1.0g/include
 OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.1.0g/lib/libssl.a
 PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3
 CPACK_SYSTEM_NAME:STRING=Linux-x86_64
-BUILD_QtDialog:BOOL:=TRUE
+BUILD_QtDialog:BOOL=TRUE
 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
 CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
 CMAKE_PREFIX_PATH:STRING=${qt_prefix}
diff --git a/Utilities/Release/win32_release.cmake 
b/Utilities/Release/win32_release.cmake
index bdf002e..f9e35a5 100644
--- a/Utilities/Release/win32_release.cmake
+++ b/Utilities/Release/win32_release.cmake
@@ -21,7 +21,7 @@ CMAKE_USE_OPENSSL:BOOL=OFF
 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
 CMAKE_Fortran_COMPILER:FILEPATH=FALSE
 CMAKE_GENERATOR:INTERNAL=Ninja
-BUILD_QtDialog:BOOL:=TRUE
+BUILD_QtDialog:BOOL=TRUE
 CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
 CMAKE_C_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
 CMAKE_CXX_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
diff --git a/Utilities/Release/win64_release.cmake 
b/Utilities/Release/win64_release.cmake
index 1c81f82..02e4096 100644
--- a/Utilities/Release/win64_release.cmake
+++ b/Utilities/Release/win64_release.cmake
@@ -21,7 +21,7 @@ CMAKE_USE_OPENSSL:BOOL=OFF
 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
 CMAKE_Fortran_COMPILER:FILEPATH=FALSE
 CMAKE_GENERATOR:INTERNAL=Ninja
-BUILD_QtDialog:BOOL:=TRUE
+BUILD_QtDialog:BOOL=TRUE
 CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
 CMAKE_C_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
 CMAKE_CXX_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1fd2bbe75bac249ce19f5a89ac06ff0bd38741c
commit b1fd2bbe75bac249ce19f5a89ac06ff0bd38741c
Author:     Marc Chevrier <marc.chevr...@sap.com>
AuthorDate: Mon Apr 2 17:16:36 2018 +0200
Commit:     Marc Chevrier <marc.chevr...@sap.com>
CommitDate: Tue Apr 3 09:41:19 2018 +0200

    FindPython: enhance multiple major versions lookup

diff --git a/Modules/FindPython.cmake b/Modules/FindPython.cmake
index c87f784..8139e53 100644
--- a/Modules/FindPython.cmake
+++ b/Modules/FindPython.cmake
@@ -144,18 +144,19 @@ else()
   set (Python_FIND_QUIETLY TRUE)
   set (Python_FIND_REQUIRED FALSE)
 
-  foreach (_Python_REQUIRED_VERSION_MAJOR IN ITEMS 3 2)
+  set (_Python_REQUIRED_VERSIONS 3 2)
+  set (_Python_REQUIRED_VERSION_LAST 2)
+
+  foreach (_Python_REQUIRED_VERSION_MAJOR IN LISTS _Python_REQUIRED_VERSIONS)
     set (Python_FIND_VERSION ${_Python_REQUIRED_VERSION_MAJOR})
     include (${CMAKE_CURRENT_LIST_DIR}/FindPython/Support.cmake)
-    if (Python_FOUND)
+    if (Python_FOUND OR
+        _Python_REQUIRED_VERSION_MAJOR EQUAL _Python_REQUIRED_VERSION_LAST)
       break()
     endif()
     # clean-up some CACHE variables to ensure look-up restart from scratch
-    foreach (_Python_ITEM IN ITEMS EXECUTABLE COMPILER
-                                   LIBRARY_RELEASE RUNTIME_LIBRARY_RELEASE
-                                   LIBRARY_DEBUG RUNTIME_LIBRARY_DEBUG
-                                   INCLUDE_DIR)
-      unset (Python_${_Python_ITEM} CACHE)
+    foreach (_Python_ITEM IN LISTS _Python_CACHED_VARS)
+      unset (${_Python_ITEM} CACHE)
     endforeach()
   endforeach()
 
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index be34624..179b394 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -162,12 +162,14 @@ unset (${_PYTHON_PREFIX}_VERSION_MINOR)
 unset (${_PYTHON_PREFIX}_VERSION_PATCH)
 
 unset (_${_PYTHON_PREFIX}_REQUIRED_VARS)
+unset (_${_PYTHON_PREFIX}_CACHED_VARS)
 
 
 # first step, search for the interpreter
 if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
   if (${_PYTHON_PREFIX}_FIND_REQUIRED_Interpreter)
     list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_EXECUTABLE)
+    list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_EXECUTABLE)
   endif()
 
   set (_${_PYTHON_PREFIX}_HINTS "${${_PYTHON_PREFIX}_ROOT_DIR}" ENV 
${_PYTHON_PREFIX}_ROOT_DIR)
@@ -305,6 +307,7 @@ endif()
 if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
   if (${_PYTHON_PREFIX}_FIND_REQUIRED_Compiler)
     list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_COMPILER)
+    list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_COMPILER)
   endif()
 
   # IronPython specific artifacts
@@ -393,6 +396,12 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
   if (${_PYTHON_PREFIX}_FIND_REQUIRED_Development)
     list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_LIBRARY
                                                   
${_PYTHON_PREFIX}_INCLUDE_DIR)
+    list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_LIBRARY
+                                                
${_PYTHON_PREFIX}_LIBRARY_RELEASE
+                                                
${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE
+                                                ${_PYTHON_PREFIX}_LIBRARY_DEBUG
+                                                
${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG
+                                                ${_PYTHON_PREFIX}_INCLUDE_DIR)
   endif()
 
   # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41eab150a8ef42bbebff18ff84652e9da1ef4e75
commit 41eab150a8ef42bbebff18ff84652e9da1ef4e75
Author:     Robert Maynard <robert.mayn...@kitware.com>
AuthorDate: Tue Mar 27 14:59:34 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Mar 28 09:38:43 2018 -0400

    CUDA: Pass more link libraries to device linking
    
    Previously we dropped non-target items from the device link line because
    nvcc rejects paths to shared library files, and only with target items
    do we know the kind of library.  However, this also prevents projects
    from linking to system-provided libraries like `cublas_device` that
    contain device code.
    
    Fix this by passing more link items to device linking.  Items that are
    not file paths, such as `-lfoo`, can simply be passed unconditionally.
    Items that are targets known to be shared libraries can still be
    skipped.  Items that are paths to library files can be passed directly
    if they end in `.a`.  Otherwise, pass them using `-Xnvlink` to bypass
    nvcc's front-end.  The nvlink tool knows to ignore shared library files.
    
    Issue: #16317

diff --git a/Source/cmLinkLineDeviceComputer.cxx 
b/Source/cmLinkLineDeviceComputer.cxx
index 3beeae3..557fa41 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -3,9 +3,9 @@
 
 #include "cmLinkLineDeviceComputer.h"
 
-#include <set>
 #include <sstream>
 
+#include "cmAlgorithms.h"
 #include "cmComputeLinkInformation.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalNinjaGenerator.h"
@@ -32,38 +32,32 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries(
   ItemVector const& items = cli.GetItems();
   std::string config = cli.GetConfig();
   for (auto const& item : items) {
-    if (!item.Target) {
-      continue;
-    }
-
-    bool skippable = false;
-    switch (item.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 =
-          item.Target->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS");
-        break;
-      default:
-        break;
-    }
-
-    if (skippable) {
-      continue;
-    }
-
-    std::set<std::string> langs;
-    item.Target->GetLanguages(langs, config);
-    if (langs.count("CUDA") == 0) {
-      continue;
+    if (item.Target) {
+      bool skip = false;
+      switch (item.Target->GetType()) {
+        case cmStateEnums::MODULE_LIBRARY:
+        case cmStateEnums::INTERFACE_LIBRARY:
+          skip = true;
+          break;
+        case cmStateEnums::STATIC_LIBRARY:
+          skip = item.Target->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS");
+          break;
+        default:
+          break;
+      }
+      if (skip) {
+        continue;
+      }
     }
 
     if (item.IsPath) {
+      // nvcc understands absolute paths to libraries ending in '.a' should
+      // be passed to nvlink.  Other extensions like '.so' or '.dylib' are
+      // rejected by the nvcc front-end even though nvlink knows to ignore
+      // them.  Bypass the front-end via '-Xnvlink'.
+      if (!cmHasLiteralSuffix(item.Value, ".a")) {
+        fout << "-Xnvlink ";
+      }
       fout << this->ConvertToOutputFormat(
         this->ConvertToLinkReference(item.Value));
     } else {
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx 
b/Source/cmNinjaNormalTargetGenerator.cxx
index f1fb2d2..52e3677 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -187,7 +187,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool 
useResponseFile)
     std::string responseFlag;
     if (!useResponseFile) {
       vars.Objects = "$in";
-      vars.LinkLibraries = "$LINK_LIBRARIES";
+      vars.LinkLibraries = "$LINK_PATH $LINK_LIBRARIES";
     } else {
       std::string cmakeVarLang = "CMAKE_";
       cmakeVarLang += this->TargetLinkLanguage;
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt
index 5ad6e6b..565baca 100644
--- a/Tests/CudaOnly/CMakeLists.txt
+++ b/Tests/CudaOnly/CMakeLists.txt
@@ -2,6 +2,7 @@
 ADD_TEST_MACRO(CudaOnly.EnableStandard CudaOnlyEnableStandard)
 ADD_TEST_MACRO(CudaOnly.ExportPTX CudaOnlyExportPTX)
 ADD_TEST_MACRO(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag)
+ADD_TEST_MACRO(CudaOnly.LinkSystemDeviceLibraries 
CudaOnlyLinkSystemDeviceLibraries)
 ADD_TEST_MACRO(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols)
 ADD_TEST_MACRO(CudaOnly.SeparateCompilation CudaOnlySeparateCompilation)
 ADD_TEST_MACRO(CudaOnly.WithDefs CudaOnlyWithDefs)
diff --git a/Tests/CudaOnly/LinkSystemDeviceLibraries/CMakeLists.txt 
b/Tests/CudaOnly/LinkSystemDeviceLibraries/CMakeLists.txt
new file mode 100644
index 0000000..62be1e6
--- /dev/null
+++ b/Tests/CudaOnly/LinkSystemDeviceLibraries/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 3.8)
+project(CudaOnlyLinkSystemDeviceLibraries CUDA)
+
+string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_35,code=compute_35 
-gencode arch=compute_35,code=sm_35")
+set(CMAKE_CUDA_STANDARD 11)
+
+add_executable(CudaOnlyLinkSystemDeviceLibraries main.cu)
+set_target_properties( CudaOnlyLinkSystemDeviceLibraries
+                       PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
+target_link_libraries( CudaOnlyLinkSystemDeviceLibraries PRIVATE cublas_device)
+
+if(APPLE)
+  # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
+  set_property(TARGET CudaOnlyLinkSystemDeviceLibraries PROPERTY BUILD_RPATH 
${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+endif()
diff --git a/Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu 
b/Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu
new file mode 100644
index 0000000..7eecec1
--- /dev/null
+++ b/Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu
@@ -0,0 +1,77 @@
+
+#include <cublas_v2.h>
+#include <cuda_runtime.h>
+#include <iostream>
+
+__global__ void deviceCublasSgemm(int n, float alpha, float beta,
+                                  const float* d_A, const float* d_B,
+                                  float* d_C)
+{
+  cublasHandle_t cnpHandle;
+  cublasStatus_t status = cublasCreate(&cnpHandle);
+
+  if (status != CUBLAS_STATUS_SUCCESS) {
+    return;
+  }
+
+  // Call function defined in the cublas_device system static library.
+  // This way we can verify that we properly pass system libraries to the
+  // device link line
+  status = cublasSgemm(cnpHandle, CUBLAS_OP_N, CUBLAS_OP_N, n, n, n, &alpha,
+                       d_A, n, d_B, n, &beta, d_C, n);
+
+  cublasDestroy(cnpHandle);
+}
+
+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 || (prop.major == 3 && prop.minor >= 5)) {
+      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.5"
+            << std::endl;
+  return 1;
+}
+
+int main(int argc, char** argv)
+{
+  int ret = choose_cuda_device();
+  if (ret) {
+    return 0;
+  }
+
+  // initial values that will make sure that the cublasSgemm won't actually
+  // do any work
+  int n = 0;
+  float alpha = 1;
+  float beta = 1;
+  float* d_A = nullptr;
+  float* d_B = nullptr;
+  float* d_C = nullptr;
+  deviceCublasSgemm<<<1, 1>>>(n, alpha, beta, d_A, d_B, d_C);
+
+  return 0;
+}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88c7abb7409c235d411c4cc899377385b91075e2
commit 88c7abb7409c235d411c4cc899377385b91075e2
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Mar 27 14:57:41 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Mar 28 09:38:43 2018 -0400

    CUDA: Pass host linker directories to device linker
    
    In some environments, libraries containing device code are installed in
    directories searched by the host linker but not passed by nvcc to
    nvlink.  Make these libraries available by explicitly passing the
    host linker search directories during device linking.
    
    Issue: #16317

diff --git a/Modules/CMakeCUDAInformation.cmake 
b/Modules/CMakeCUDAInformation.cmake
index 167e177..4788cbf 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/Modules/CMakeCUDAInformation.cmake
@@ -177,17 +177,31 @@ else()
   set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "")
 endif()
 
+# Add implicit host link directories that contain device libraries
+# to the device link line.
+set(__IMPLICT_DLINK_DIRS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+if(__IMPLICT_DLINK_DIRS)
+  list(REMOVE_ITEM __IMPLICT_DLINK_DIRS 
${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
+endif()
+set(__IMPLICT_DLINK_FLAGS )
+foreach(dir ${__IMPLICT_DLINK_DIRS})
+  if(EXISTS "${dir}/libcublas_device.a")
+    string(APPEND __IMPLICT_DLINK_FLAGS " -L\"${dir}\"")
+  endif()
+endforeach()
+unset(__IMPLICT_DLINK_DIRS)
 
 #These are used when linking relocatable (dc) cuda code
 if(NOT CMAKE_CUDA_DEVICE_LINK_LIBRARY)
   set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
-    "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <CMAKE_CUDA_LINK_FLAGS> 
<LANGUAGE_COMPILE_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES>")
+    "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <CMAKE_CUDA_LINK_FLAGS> 
<LANGUAGE_COMPILE_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}")
 endif()
 if(NOT CMAKE_CUDA_DEVICE_LINK_EXECUTABLE)
   set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
-    "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <FLAGS> 
<CMAKE_CUDA_LINK_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES>")
+    "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <FLAGS> 
<CMAKE_CUDA_LINK_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}")
 endif()
 
 unset(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS)
+unset(__IMPLICT_DLINK_FLAGS)
 
 set(CMAKE_CUDA_INFORMATION_LOADED 1)
diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake 
b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
index 970c2c6..0c11e55 100644
--- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake
+++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
@@ -36,12 +36,27 @@ else()
   set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "")
 endif()
 
+# Add implicit host link directories that contain device libraries
+# to the device link line.
+set(__IMPLICT_DLINK_DIRS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+if(__IMPLICT_DLINK_DIRS)
+  list(REMOVE_ITEM __IMPLICT_DLINK_DIRS 
${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
+endif()
+set(__IMPLICT_DLINK_FLAGS )
+foreach(dir ${__IMPLICT_DLINK_DIRS})
+  if(EXISTS "${dir}/cublas_device.lib")
+    string(APPEND __IMPLICT_DLINK_FLAGS " -L\"${dir}\"")
+  endif()
+endforeach()
+unset(__IMPLICT_DLINK_DIRS)
+
 set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
-  "<CMAKE_CUDA_COMPILER> <CMAKE_CUDA_LINK_FLAGS> <LANGUAGE_COMPILE_FLAGS> 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
+  "<CMAKE_CUDA_COMPILER> <CMAKE_CUDA_LINK_FLAGS> <LANGUAGE_COMPILE_FLAGS> 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES> 
-Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS${__IMPLICT_DLINK_FLAGS}")
 set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
-  "<CMAKE_CUDA_COMPILER> <FLAGS> <CMAKE_CUDA_LINK_FLAGS> 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
+  "<CMAKE_CUDA_COMPILER> <FLAGS> <CMAKE_CUDA_LINK_FLAGS> 
${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> 
<LINK_LIBRARIES> 
-Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS${__IMPLICT_DLINK_FLAGS}")
 
 unset(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS)
+unset(__IMPLICT_DLINK_FLAGS)
 
 string(REPLACE "/D" "-D" _PLATFORM_DEFINES_CUDA 
"${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_CXX}")
 

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

Summary of changes:
 Modules/CMakeCUDAInformation.cmake                 |   18 ++++-
 Modules/FindPython.cmake                           |   15 ++--
 Modules/FindPython/Support.cmake                   |    9 +++
 Modules/Platform/Android-Clang-CXX.cmake           |    7 ++
 Modules/Platform/Android-GNU-CXX.cmake             |    3 +
 Modules/Platform/Android/ndk-stl-c++.cmake         |    1 +
 Modules/Platform/Android/ndk-stl-gabi++.cmake      |    1 +
 Modules/Platform/Android/ndk-stl-gnustl.cmake      |    1 +
 Modules/Platform/Android/ndk-stl-none.cmake        |    1 +
 Modules/Platform/Android/ndk-stl-stlport.cmake     |    1 +
 Modules/Platform/Android/ndk-stl-system.cmake      |    1 +
 Modules/Platform/Windows-NVIDIA-CUDA.cmake         |   19 ++++-
 Source/cmLinkLineDeviceComputer.cxx                |   54 ++++++--------
 Source/cmNinjaNormalTargetGenerator.cxx            |    2 +-
 Tests/CudaOnly/CMakeLists.txt                      |    1 +
 .../LinkSystemDeviceLibraries/CMakeLists.txt       |   15 ++++
 Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu   |   77 ++++++++++++++++++++
 Tests/RunCMake/Android/android_lib.cxx             |    4 +
 Tests/RunCMake/Android/check_binary.cmake          |    8 ++
 Tests/RunCMake/Android/common.cmake                |   17 +++++
 Utilities/Release/linux64_release.cmake            |    2 +-
 Utilities/Release/win32_release.cmake              |    2 +-
 Utilities/Release/win64_release.cmake              |    2 +-
 23 files changed, 216 insertions(+), 45 deletions(-)
 create mode 100644 Tests/CudaOnly/LinkSystemDeviceLibraries/CMakeLists.txt
 create mode 100644 Tests/CudaOnly/LinkSystemDeviceLibraries/main.cu
 create mode 100644 Tests/RunCMake/Android/android_lib.cxx
 create mode 100644 Tests/RunCMake/Android/check_binary.cmake


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to