I\'m trying to configure a very simple CUDA project in CLion 2020.1.
I\'m on Fedora 31 (default gcc is 9.3), but compiled gcc 8.2 from source to use it with Cuda Toolkit
So, I filed a bug against CLion about this issue - the one @MaximBanaev pointed out:
CPP-19089: Can't get CLion to use a non-default C++ compiler with CUDA
CLion has simply not properly taken this issue into account in its toolchain mechanism. The issue is not even just the environment - there needs to be proper UI to set the "backing" C++ compiler for CUDA, in addition to CLion noticing the relevant settings when it comes up.
This isn't the only "fundamental" bug I've encountered trying to use CLion with CUDA projects. The support is still rather half-baked IMHO. I wish they get it right, because I would like to this IDE out and for now, I can't.