cub icon indicating copy to clipboard operation
cub copied to clipboard

Compilation with cuda 10.1 fails

Open mminutoli opened this issue 3 years ago • 1 comments

https://github.com/NVIDIA/cub/blob/571aab900cc1d9741d93013ceaffe38d7e6e3b50/cmake/CubBuildCompilerTargets.cmake#L115

Hello folks,

using CUDA 10.1.* the compilation fails because the compiler does not recognize --promote_warnings as a valid compiler flag.

I believe something like the following should fix it. However, I don't know the exact version where that flag was introduced. $<$<AND:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>,$<VERSION_GREATER_EQUAL:$<CUDA_COMPILER_VERSION>, %some_compiler_version%>>:--promote_warnings>

Can you please fix it?

Thanks, Marco.

mminutoli avatar Aug 18 '21 16:08 mminutoli

Thanks for the report, we should fix this at some point.

BTW, there's no reason for a user to build these targets, since CUB is header-only -- the only targets compiled by our build system are tests and examples. The user CMake packages for CUB will not enable this flag.

alliepiper avatar Sep 13 '21 18:09 alliepiper

These flags are intended for developer / CI builds only, and we only officially support CTK 11.0+, so we will not be addressing this issue.

alliepiper avatar Feb 23 '23 16:02 alliepiper