CUDA: Generate better error message when detecting nvcc

Issue: #23322, #23323
1 file changed