summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-26 14:58:08 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-26 14:58:08 (GMT)
commit505bdd3d2982d4712301fe3416f546e46fa72eae (patch)
tree2b897275e0c88ee54ea506fdcd200d262166bee4 /Modules
parentc22a2b49afed255593d1cc8425a5fd1fd2e1a81c (diff)
parentb127e0c5610221d10c1d6658db96741ab85a083c (diff)
downloadCMake-505bdd3d2982d4712301fe3416f546e46fa72eae.zip
CMake-505bdd3d2982d4712301fe3416f546e46fa72eae.tar.gz
CMake-505bdd3d2982d4712301fe3416f546e46fa72eae.tar.bz2
Merge branch 'cuda-bracket-output' into release-3.14
Merge-request: !3151
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake
index 113b520..490d659 100644
--- a/Modules/CMakeDetermineCUDACompiler.cmake
+++ b/Modules/CMakeDetermineCUDACompiler.cmake
@@ -111,10 +111,15 @@ elseif(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA)
if(_nvcc_libraries)
# Remove variable assignments.
string(REGEX REPLACE "#\\\$ *[^= ]+=[^\n]*\n" "" _nvcc_output "${_nvcc_output_orig}")
+ # Encode [] characters that break list expansion.
+ string(REPLACE "[" "{==={" _nvcc_output "${_nvcc_output}")
+ string(REPLACE "]" "}===}" _nvcc_output "${_nvcc_output}")
# Split lines.
string(REGEX REPLACE "\n+(#\\\$ )?" ";" _nvcc_output "${_nvcc_output}")
foreach(line IN LISTS _nvcc_output)
set(_nvcc_output_line "${line}")
+ string(REPLACE "{==={" "[" _nvcc_output_line "${_nvcc_output_line}")
+ string(REPLACE "}===}" "]" _nvcc_output_line "${_nvcc_output_line}")
string(APPEND _nvcc_log " considering line: [${_nvcc_output_line}]\n")
if("${_nvcc_output_line}" MATCHES "^ *nvlink")
string(APPEND _nvcc_log " ignoring nvlink line\n")