diff options
author | samuel100u <hsm100u@cs.ccu.edu.tw> | 2021-09-30 09:54:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-09-30 13:33:17 (GMT) |
commit | a1f0ddcbb724914005b74ca181bfd1da391df7c7 (patch) | |
tree | 2d3b7026b48dc382d3e41eeaa87b42536fab55b3 /Modules/CMakeDetermineCUDACompiler.cmake | |
parent | 32818510c885a50ec611333b657f58d3be28c5bc (diff) | |
download | CMake-a1f0ddcbb724914005b74ca181bfd1da391df7c7.zip CMake-a1f0ddcbb724914005b74ca181bfd1da391df7c7.tar.gz CMake-a1f0ddcbb724914005b74ca181bfd1da391df7c7.tar.bz2 |
CUDA: Fix detection of implicit link information with CUDA 6.5
Fixes: #22701
Diffstat (limited to 'Modules/CMakeDetermineCUDACompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCUDACompiler.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 342425c..d06315e 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -441,9 +441,10 @@ elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") if("${_nvcc_output_line}" MATCHES "^ *nvlink") string(APPEND _nvcc_log " ignoring nvlink line\n") elseif(_nvcc_libraries) - if("${_nvcc_output_line}" MATCHES "(@\"?tmp/a\\.exe\\.res\"?)") + if("${_nvcc_output_line}" MATCHES "(@\"?((tmp/)?a\\.exe\\.res)\"?)") set(_nvcc_link_res_arg "${CMAKE_MATCH_1}") - set(_nvcc_link_res "${CMAKE_PLATFORM_INFO_DIR}/CompilerIdCUDA/tmp/a.exe.res") + set(_nvcc_link_res_file "${CMAKE_MATCH_2}") + set(_nvcc_link_res "${CMAKE_PLATFORM_INFO_DIR}/CompilerIdCUDA/${_nvcc_link_res_file}") if(EXISTS "${_nvcc_link_res}") file(READ "${_nvcc_link_res}" _nvcc_link_res_content) string(REPLACE "${_nvcc_link_res_arg}" "${_nvcc_link_res_content}" _nvcc_output_line "${_nvcc_output_line}") |