summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-21 14:48:41 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-21 14:49:50 (GMT)
commite15a9187b04336b64c92bde0a6b879237193ac5f (patch)
tree2301eda5aec163c34c5929876b1cdc31be9e3cca /Modules
parentde2c73d84f767e8d80ed310151384554506ff49b (diff)
parent76b76a7f9bdf54c8dc299bd1a9c7bcc0bc9ef005 (diff)
downloadCMake-e15a9187b04336b64c92bde0a6b879237193ac5f.zip
CMake-e15a9187b04336b64c92bde0a6b879237193ac5f.tar.gz
CMake-e15a9187b04336b64c92bde0a6b879237193ac5f.tar.bz2
Merge topic 'FindCUDA-nvcc-include-dir-backslash'
76b76a7f9b FindCUDA: Fix support for backslashes in CUDA_NVCC_INCLUDE_DIRS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3679
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index 6fc2439..af15d55 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -75,7 +75,8 @@ set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@") # path
set(CUDA_NVCC_FLAGS @CUDA_NVCC_FLAGS@ ;; @CUDA_WRAP_OPTION_NVCC_FLAGS@) # list
@CUDA_NVCC_FLAGS_CONFIG@
set(nvcc_flags @nvcc_flags@) # list
-set(CUDA_NVCC_INCLUDE_DIRS "@CUDA_NVCC_INCLUDE_DIRS@") # list (needs to be in quotes to handle spaces properly).
+set(CUDA_NVCC_INCLUDE_DIRS [==[@CUDA_NVCC_INCLUDE_DIRS@]==]) # list (needs to be in lua quotes to address backslashes)
+string(REPLACE "\\" "/" CUDA_NVCC_INCLUDE_DIRS "${CUDA_NVCC_INCLUDE_DIRS}")
set(CUDA_NVCC_COMPILE_DEFINITIONS [==[@CUDA_NVCC_COMPILE_DEFINITIONS@]==]) # list (needs to be in lua quotes see #16510 ).
set(format_flag "@format_flag@") # string
set(cuda_language_flag @cuda_language_flag@) # list