diff options
author | James Bigler <jamesbigler@gmail.com> | 2010-10-04 22:42:21 (GMT) |
---|---|---|
committer | James Bigler <jamesbigler@gmail.com> | 2010-10-04 22:42:21 (GMT) |
commit | 6916f8dba73069bce71c6032b9a90dd6579c0971 (patch) | |
tree | 41609802c98ce71dea1d4f92594e0f9e661627a4 /Modules/FindCUDA.cmake | |
parent | 5eca3dd0f0289a84c30c98887c053d4dad54b8a5 (diff) | |
download | CMake-6916f8dba73069bce71c6032b9a90dd6579c0971.zip CMake-6916f8dba73069bce71c6032b9a90dd6579c0971.tar.gz CMake-6916f8dba73069bce71c6032b9a90dd6579c0971.tar.bz2 |
Allow -g3 for CUDA v3.0+.
In versions of the CUDA toolkit previous to version 3.0 the use of -g3 would cause
compilation errors. This was fixed in version 3.0.
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r-- | Modules/FindCUDA.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index dad5709..5b189d4 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -941,8 +941,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}}") |