summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake5
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}")