Solution to issue cannot be found in the documentation.
[X] I checked the documentation.
Issue
In addition to CFLAGS and CXXFLAGS, the activation script should also export CUDAFLAGS which is the environment variable checked by recent versions of CMAKE to add flags nvcc calls [1]. Something like:
export CUDAFLAGS="${CUDAFLAGS} ${CUDA_CFLAGS}"
CFLAGS and CXXFLAGS may not be applied when nvcc compiler is compiling .cu files, but external CUDA library headers are still needed. CMake adds CUDAFLAGS (CMAKE_CUDA_FLAGS) to these calls. I'm not sure if the linking flags are also needed.
Solution to issue cannot be found in the documentation.
Issue
In addition to CFLAGS and CXXFLAGS, the activation script should also export CUDAFLAGS which is the environment variable checked by recent versions of CMAKE to add flags nvcc calls [1]. Something like:
CFLAGS and CXXFLAGS may not be applied when nvcc compiler is compiling .cu files, but external CUDA library headers are still needed. CMake adds CUDAFLAGS (CMAKE_CUDA_FLAGS) to these calls. I'm not sure if the linking flags are also needed.
[1] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html
Installed packages
Environment info