[Cmake-commits] CMake branch, master, updated. v3.9.4-1074-g4ffa4dd
Kitware Robot
kwrobot at kitware.com
Thu Oct 5 07:45:10 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 4ffa4ddd8078918583fc03302fa3c3db2c1ca733 (commit)
via 69257d456a0b924adb4b14eecfc6d53cc5f3e2e9 (commit)
via b374ea86c65ac56d077b75f9ff8cca96226f3731 (commit)
via 7914fb82234a9b94ca32879763623bb7c8a4e008 (commit)
via e55d69cf5a24d7534cdc41f9554ff7873faec6c3 (commit)
via 8b09c20c3a4aba1eabd65579ebc408c5d8d17a2e (commit)
from dbb16722ee0669b52ef15b4ee35c7ca623e400c9 (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=4ffa4ddd8078918583fc03302fa3c3db2c1ca733
commit 4ffa4ddd8078918583fc03302fa3c3db2c1ca733
Merge: 69257d4 7914fb8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 5 11:36:48 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Oct 5 07:36:53 2017 -0400
Merge topic 'cuda-default-link-launcher'
7914fb82 CUDA: Fix default selection of host compiler used to drive linking
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1341
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69257d456a0b924adb4b14eecfc6d53cc5f3e2e9
commit 69257d456a0b924adb4b14eecfc6d53cc5f3e2e9
Merge: b374ea8 8b09c20
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 5 11:35:45 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Oct 5 07:36:03 2017 -0400
Merge topic 'FindCUDA-run_nvcc-CMP0007'
8b09c20c FindCUDA: Fix CMP0007 warning in run_nvcc.cmake
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1340
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b374ea86c65ac56d077b75f9ff8cca96226f3731
commit b374ea86c65ac56d077b75f9ff8cca96226f3731
Merge: dbb1672 e55d69c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 5 11:35:18 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Oct 5 07:35:32 2017 -0400
Merge topic 'test-load_command-simplify'
e55d69cf Tests: Remove ancient workaround in LoadCommand tests
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1342
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7914fb82234a9b94ca32879763623bb7c8a4e008
commit 7914fb82234a9b94ca32879763623bb7c8a4e008
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 4 09:04:07 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 4 10:25:47 2017 -0400
CUDA: Fix default selection of host compiler used to drive linking
When no explicit `CMAKE_CUDA_HOST_COMPILER` is specified by the user
then we do not pass `-ccbin` to `nvcc`. In this case, nvcc's link line
we extract during the compiler identification step may not have the
absolute path to the host compiler it uses to drive linking. If it is
not absolute, use the `PATH=` from nvcc's output to search for it since
that is the one `nvcc` would use.
This fixes our internal `CMAKE_CUDA_HOST_LINK_LAUNCHER` value used to
construct link lines when using `CUDA` as the linker language. It needs
to match the host compiler `nvcc` uses internally during compilation.
Fixes: #17323
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake
index 89ac9fa..c9cd7e2 100644
--- a/Modules/CMakeDetermineCUDACompiler.cmake
+++ b/Modules/CMakeDetermineCUDACompiler.cmake
@@ -87,6 +87,15 @@ if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
elseif(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA)
set(_nvcc_log "")
string(REPLACE "\r" "" _nvcc_output_orig "${CMAKE_CUDA_COMPILER_PRODUCED_OUTPUT}")
+ if(_nvcc_output_orig MATCHES "#\\\$ +PATH= *([^\n]*)\n")
+ set(_nvcc_path "${CMAKE_MATCH_1}")
+ string(APPEND _nvcc_log " found 'PATH=' string: [${_nvcc_path}]\n")
+ string(REPLACE ":" ";" _nvcc_path "${_nvcc_path}")
+ else()
+ set(_nvcc_path "")
+ string(REPLACE "\n" "\n " _nvcc_output_log "\n${_nvcc_output_orig}")
+ string(APPEND _nvcc_log " no 'PATH=' string found in nvcc output:${_nvcc_output_log}\n")
+ endif()
if(_nvcc_output_orig MATCHES "#\\\$ +LIBRARIES= *([^\n]*)\n")
set(_nvcc_libraries "${CMAKE_MATCH_1}")
string(APPEND _nvcc_log " found 'LIBRARIES=' string: [${_nvcc_libraries}]\n")
@@ -131,7 +140,26 @@ elseif(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA)
else()
#extract the compiler that is being used for linking
separate_arguments(_nvcc_link_line_args UNIX_COMMAND "${_nvcc_link_line}")
- list(GET _nvcc_link_line_args 0 CMAKE_CUDA_HOST_LINK_LAUNCHER)
+ list(GET _nvcc_link_line_args 0 _nvcc_host_link_launcher)
+ if(IS_ABSOLUTE "${_nvcc_host_link_launcher}")
+ string(APPEND _nvcc_log " extracted link launcher absolute path: [${_nvcc_host_link_launcher}]\n")
+ set(CMAKE_CUDA_HOST_LINK_LAUNCHER "${_nvcc_host_link_launcher}")
+ else()
+ string(APPEND _nvcc_log " extracted link launcher name: [${_nvcc_host_link_launcher}]\n")
+ find_program(_nvcc_find_host_link_launcher
+ NAMES ${_nvcc_host_link_launcher}
+ PATHS ${_nvcc_path} NO_DEFAULT_PATH)
+ find_program(_nvcc_find_host_link_launcher
+ NAMES ${_nvcc_host_link_launcher})
+ if(_nvcc_find_host_link_launcher)
+ string(APPEND _nvcc_log " found link launcher absolute path: [${_nvcc_find_host_link_launcher}]\n")
+ set(CMAKE_CUDA_HOST_LINK_LAUNCHER "${_nvcc_find_host_link_launcher}")
+ else()
+ string(APPEND _nvcc_log " could not find link launcher absolute path\n")
+ set(CMAKE_CUDA_HOST_LINK_LAUNCHER "${_nvcc_host_link_launcher}")
+ endif()
+ unset(_nvcc_find_host_link_launcher CACHE)
+ endif()
endif()
#prefix the line with cuda-fake-ld so that implicit link info believes it is
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e55d69cf5a24d7534cdc41f9554ff7873faec6c3
commit e55d69cf5a24d7534cdc41f9554ff7873faec6c3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 3 14:13:42 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 4 09:42:52 2017 -0400
Tests: Remove ancient workaround in LoadCommand tests
diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt
index 03a3b49..cfaebad 100644
--- a/Tests/LoadCommand/CMakeLists.txt
+++ b/Tests/LoadCommand/CMakeLists.txt
@@ -22,13 +22,6 @@ else()
${LoadCommand_SOURCE_DIR}/CMakeCommands
CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO
OUTPUT_VARIABLE OUTPUT )
-# do another TRY_COMPILE to get around make
-# problem on hp
- try_compile(COMPILE_OK
- ${LoadCommand_BINARY_DIR}/CMakeCommands
- ${LoadCommand_SOURCE_DIR}/CMakeCommands
- CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO
- OUTPUT_VARIABLE OUTPUT )
endif()
message("Output from try compile: ${OUTPUT}")
diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt
index 6affd34..65de042 100644
--- a/Tests/LoadCommandOneConfig/CMakeLists.txt
+++ b/Tests/LoadCommandOneConfig/CMakeLists.txt
@@ -28,13 +28,6 @@ else()
${LoadCommand_SOURCE_DIR}/CMakeCommands
CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO
OUTPUT_VARIABLE OUTPUT )
-# do another TRY_COMPILE to get around make
-# problem on hp
- try_compile(COMPILE_OK
- ${LoadCommand_BINARY_DIR}/CMakeCommands
- ${LoadCommand_SOURCE_DIR}/CMakeCommands
- CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO
- OUTPUT_VARIABLE OUTPUT )
endif()
message("Output from try compile: ${OUTPUT}")
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b09c20c3a4aba1eabd65579ebc408c5d8d17a2e
commit 8b09c20c3a4aba1eabd65579ebc408c5d8d17a2e
Author: Umar Arshad <umar at arrayfire.com>
AuthorDate: Tue Oct 3 21:41:45 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 4 08:07:37 2017 -0400
FindCUDA: Fix CMP0007 warning in run_nvcc.cmake
Set `CMP0007` to `NEW` for the entire script. The script comes with
CMake and is aware of the policy's behavior, so set the policy to ensure
that its warnings do not show up during the build phase.
Fixes: #16579
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index ec5a099..f78119d 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -50,6 +50,8 @@
# generated_cubin_file:STRING=<> File to generate. This argument must be passed
# in if build_cubin is true.
+cmake_policy(PUSH)
+cmake_policy(SET CMP0007 NEW)
if(NOT generated_file)
message(FATAL_ERROR "You must specify generated_file on the command line")
endif()
@@ -179,13 +181,8 @@ cuda_execute_process(
set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}")
set(CUDA_VERSION @CUDA_VERSION@)
if(CUDA_VERSION VERSION_LESS "3.0")
- cmake_policy(PUSH)
- # CMake policy 0007 NEW states that empty list elements are not
- # ignored. I'm just setting it to avoid the warning that's printed.
- cmake_policy(SET CMP0007 NEW)
# Note that this will remove all occurances of -G.
list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G")
- cmake_policy(POP)
endif()
# nvcc doesn't define __CUDACC__ for some reason when generating dependency files. This
@@ -304,3 +301,5 @@ if( build_cubin )
)
endif()
+
+cmake_policy(POP)
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeDetermineCUDACompiler.cmake | 30 ++++++++++++++++++++++++++++-
Modules/FindCUDA/run_nvcc.cmake | 9 ++++-----
Tests/LoadCommand/CMakeLists.txt | 7 -------
Tests/LoadCommandOneConfig/CMakeLists.txt | 7 -------
4 files changed, 33 insertions(+), 20 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list