summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-01-15 13:44:15 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-15 13:46:20 (GMT)
commit6ccc307053f03c4c48a2cb9d5795f91d341a5c39 (patch)
tree20c08d24e5cf3b2201fb863f3942ab3f5d2471ae /Modules/FindCUDA.cmake
parent43a32bdff6b452016a9b59224cd83e3c79c58e28 (diff)
downloadCMake-6ccc307053f03c4c48a2cb9d5795f91d341a5c39.zip
CMake-6ccc307053f03c4c48a2cb9d5795f91d341a5c39.tar.gz
CMake-6ccc307053f03c4c48a2cb9d5795f91d341a5c39.tar.bz2
FindCUDA: Support special characters in path (#15919)
Add `VERBATIM` to all `add_custom_command` calls so that CMake will escape arguments properly even when special characters such as "()" are present. Suggested-by: Nils Gladitz <nilsgladitz@gmail.com>
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r--Modules/FindCUDA.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index ada5b8a..1674e2d 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -1474,6 +1474,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
-P "${custom_target_script}"
WORKING_DIRECTORY "${cuda_compile_intermediate_directory}"
COMMENT "${cuda_build_comment_string}"
+ VERBATIM
)
# Make sure the build system knows the file is generated.
@@ -1592,6 +1593,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file}
${flags}
COMMENT "Building NVCC intermediate link file ${output_file_relative_path}"
+ VERBATIM
)
else()
get_filename_component(output_file_dir "${output_file}" DIRECTORY)
@@ -1601,6 +1603,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${output_file_dir}"
COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}"
+ VERBATIM
)
endif()
endif()