Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit fddb888

Browse files
committed
Fix NVCC deprecation warnings from tex_ref_input_iterator
Add `-Wno-deprecated-declarations` flag to nvcc. We already do this for GCC/Clang, this just adds the flag for nvcc itself.
1 parent b8b7461 commit fddb888

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/CubBuildCompilerTargets.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,10 @@ function(cub_build_compiler_targets)
115115
$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CUDA_COMPILER_ID:NVIDIA>>:-Xcudafe=--promote_warnings>
116116
# Don't complain about deprecated GPU targets.
117117
$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CUDA_COMPILER_ID:NVIDIA>>:-Wno-deprecated-gpu-targets>
118+
# Suppress deprecation warnings in nvcc < 11.5.
119+
# TexRefInputIterator uses deprecated CUDART APIs, see NVIDIA/cub#191.
120+
# After 11.5, we will suppress these in-code via pragma, but for older nvcc
121+
# we have to use the big hammer:
122+
$<$<AND:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>,$<VERSION_LESS:$<CUDA_COMPILER_VERSION>,11.5>>:-Wno-deprecated-declarations>
118123
)
119124
endfunction()

0 commit comments

Comments
 (0)