summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-10-05 19:33:12 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-10-05 19:33:12 (GMT)
commitba3064b5848a994765d5fbf76ff516cd98f4465f (patch)
tree8a3c5aec57a9fcb0e8f2027482ae6239620d86cd /Modules/FindCUDA.cmake
parent100f2ad2783de30e3d219a54df9eaa5b1a76c09f (diff)
parent6916f8dba73069bce71c6032b9a90dd6579c0971 (diff)
downloadCMake-ba3064b5848a994765d5fbf76ff516cd98f4465f.zip
CMake-ba3064b5848a994765d5fbf76ff516cd98f4465f.tar.gz
CMake-ba3064b5848a994765d5fbf76ff516cd98f4465f.tar.bz2
Merge topic 'FindCUDA-allow-g3'
6916f8d Allow -g3 for CUDA v3.0+.
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r--Modules/FindCUDA.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 0718aef..1547b19 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -943,8 +943,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# we convert the strings to lists (like we want).
if(CUDA_PROPAGATE_HOST_FLAGS)
- # nvcc chokes on -g3, so replace it with -g
- if(CMAKE_COMPILER_IS_GNUCC)
+ # nvcc chokes on -g3 in versions previous to 3.0, so replace it with -g
+ if(CMAKE_COMPILER_IS_GNUCC AND CUDA_VERSION VERSION_LESS "3.0")
string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
else()
set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")