mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 11:10:06 -05:00
CUDA: Find MSVC binutils on Windows
On Windows the host link launcher is just `link.exe`. Find and use that instead of trying to extract the launcher from the `nvcc -v` output.
This commit is contained in:
@@ -116,9 +116,13 @@ if(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(_nvcc_link_line)
|
if(_nvcc_link_line)
|
||||||
#extract the compiler that is being used for linking
|
if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||||
separate_arguments(_nvcc_link_line_args UNIX_COMMAND "${_nvcc_link_line}")
|
set(CMAKE_CUDA_HOST_LINK_LAUNCHER "${CMAKE_LINKER}")
|
||||||
list(GET _nvcc_link_line_args 0 CMAKE_CUDA_HOST_LINK_LAUNCHER)
|
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)
|
||||||
|
endif()
|
||||||
|
|
||||||
#prefix the line with cuda-fake-ld so that implicit link info believes it is
|
#prefix the line with cuda-fake-ld so that implicit link info believes it is
|
||||||
#a link line
|
#a link line
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
|
|||||||
OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC"
|
OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||||
OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC"
|
OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC"
|
||||||
OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
|
OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
|
||||||
|
OR "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||||
OR (CMAKE_GENERATOR MATCHES "Visual Studio"
|
OR (CMAKE_GENERATOR MATCHES "Visual Studio"
|
||||||
AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android"))
|
AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user