diff options
author | James Bigler <jamesbigler@gmail.com> | 2015-04-01 23:23:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-09 15:41:36 (GMT) |
commit | 1b0c77a33d2e598c48bc8ad385cfd0586b8294e9 (patch) | |
tree | 30d3059fdac5d047bffb94e56e9594471451778e /Modules/FindCUDA.cmake | |
parent | 8313de2d5adf4514f0b3cccca747e78ca07d3ad3 (diff) | |
download | CMake-1b0c77a33d2e598c48bc8ad385cfd0586b8294e9.zip CMake-1b0c77a33d2e598c48bc8ad385cfd0586b8294e9.tar.gz CMake-1b0c77a33d2e598c48bc8ad385cfd0586b8294e9.tar.bz2 |
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.cmake')
-rw-r--r-- | Modules/FindCUDA.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index de66443..1802e61 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1310,7 +1310,9 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files) endif() # If file isn't a .cu file, we need to tell nvcc to treat it as such. if(NOT ${file} MATCHES "\\.cu$") - list(APPEND nvcc_flags "-x=cu") + set(cuda_language_flag -x=cu) + else() + set(cuda_language_flag) endif() if( ${_cuda_source_format} MATCHES "OBJ") |