I'm using a CUDA version which does not support the GCC version installed on my system (my GCC is too new). I'm trying to build a repository which uses CMake for build configuration.
I know how to override the C++ compiler, traditionally:
export CXX=/path/to/other/compiler-binary
and CMake picks this up. I can also use cmake -DCMAKE_CXX_COMPILER
. However, neither of these options work when compiling CUDA host-side code: CMake still has CUDA try to use my default GCC version on my system.
How can I tell it to use the alternative C++ compiler for CUDA?
Additional info:
- CMake 3.22.1
- On Devuan GNU/Linux Chimaera