I am having build problems with LAMMPS that go back FindCUDA.cmake. FindCUDA.cmake selects CMAKE_C_COMPILER as the default value for the CUDA_HOST_COMPILER setting. As CUDA is a version of C++ (see https://docs.nvidia.com/cuda/pdf/CUDA_C_Programming_Guide.pdf sections 6.1, 6.1.5, and chapter 17) this choice is invalid (just like the nvcc error messages tell me). In fact if CUDAHOSTCXX is set then this value is used, clearly indicating that it is known that CUDA_HOST_COMPILER is supposed to be a C++ compiler and not a C compiler.
Would it not be better to set CUDA_HOST_COMPILER to CMAKE_CXX_COMPILER by default rather than choosing a default that breaks builds?