summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r--Modules/FindCUDA.cmake4
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")