diff options
author | Raul Tambre <raul@tambre.ee> | 2020-07-14 19:24:40 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-07-14 19:27:58 (GMT) |
commit | ff086f066b1e4e2bba71eee34d4e821d2f5e9420 (patch) | |
tree | 055702e030b7704350d6e35ec582c1021c77e94b /Modules | |
parent | 8c6cce27ca74d28e6370d1a424fc11c1d3686eb9 (diff) | |
download | CMake-ff086f066b1e4e2bba71eee34d4e821d2f5e9420.zip CMake-ff086f066b1e4e2bba71eee34d4e821d2f5e9420.tar.gz CMake-ff086f066b1e4e2bba71eee34d4e821d2f5e9420.tar.bz2 |
NVCC: Handle host compiler with spaces in path
Need to surround it with quotes otherwise the different bits are passed as
separate arguments.
Fixes #20954.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCUDACompiler.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 692ce20..fa497cd 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -188,7 +188,7 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") set(nvcc_test_flags "--keep --keep-dir tmp") if(CMAKE_CUDA_HOST_COMPILER) - string(APPEND nvcc_test_flags " -ccbin=${CMAKE_CUDA_HOST_COMPILER}") + string(APPEND nvcc_test_flags " -ccbin=\"${CMAKE_CUDA_HOST_COMPILER}\"") endif() elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") if(WIN32) @@ -456,7 +456,7 @@ elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") "Parsed CUDA nvcc implicit link information from above output:\n${_nvcc_log}\n${log}\n\n") else() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Failed to parsed CUDA nvcc implicit link information:\n${_nvcc_log}\n\n") + "Failed to parse CUDA nvcc implicit link information:\n${_nvcc_log}\n\n") message(FATAL_ERROR "Failed to extract nvcc implicit link line.") endif() endif() |