summaryrefslogtreecommitdiff
path: root/Modules/FindCUDA/run_nvcc.cmake
diff options
context:
space:
mode:
authorJames Bigler <jamesbigler@gmail.com>2015-04-01 17:23:51 -0600
committerBrad King <brad.king@kitware.com>2015-04-09 11:41:36 -0400
commit1b0c77a33d2e598c48bc8ad385cfd0586b8294e9 (patch)
tree30d3059fdac5d047bffb94e56e9594471451778e /Modules/FindCUDA/run_nvcc.cmake
parent8313de2d5adf4514f0b3cccca747e78ca07d3ad3 (diff)
downloadcmake-1b0c77a33d2e598c48bc8ad385cfd0586b8294e9.tar.gz
FindCUDA: Add specific cuda_language_flag instead of using nvcc.
I was previously appending to nvcc_flags inside the file loop. This caused the flag to be appended multiple times which freaks out nvcc. Now the flag is specifically handled per file.
Diffstat (limited to 'Modules/FindCUDA/run_nvcc.cmake')
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index abdd3079e1..80323091d3 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -75,6 +75,7 @@ set(CUDA_NVCC_FLAGS @CUDA_NVCC_FLAGS@ ;; @CUDA_WRAP_OPTION_NVCC_FLAGS@) # list
set(nvcc_flags @nvcc_flags@) # list
set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@") # list (needs to be in quotes to handle spaces properly).
set(format_flag "@format_flag@") # string
+set(cuda_language_flag @cuda_language_flag@) # list
if(build_cubin AND NOT generated_cubin_file)
message(FATAL_ERROR "You must specify generated_cubin_file on the command line")
@@ -238,6 +239,7 @@ cuda_execute_process(
"Generating ${generated_file}"
COMMAND "${CUDA_NVCC_EXECUTABLE}"
"${source_file}"
+ ${cuda_language_flag}
${format_flag} -o "${generated_file}"
${CCBIN}
${nvcc_flags}