nvcc test CMakeCUDACompilerId.cu needs c++flag
When clang switched its default from c++14 to c++17 and cmake gets choked when compiling CMakeCUDACompilerId.cu
nvcc --allow-unsupported-compiler -ccbin=/soft/compilers/llvm/main-20220908/bin/clang++ -gencode=arch=compute_80,code=sm_80 ./CMakeFiles/3.23.2/CompilerIdCUDA/CMakeCUDACompilerId.cu
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_pair.h(442): error: argument list for class template "std::pair" is missing
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_pair.h(442): error: expected a ")"
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_pair.h(442): error: template parameter "_T1" may not be redeclared in this scope
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/stl_pair.h(442): error: expected a ";"
4 errors detected in the compilation of "./CMakeFiles/3.23.2/CompilerIdCUDA/CMakeCUDACompilerId.cu".
https://github.com/llvm/llvm-project/issues/57763
Even if I set CMAKE_CUDA_STANDARD to 17 already, the nvcc compiler test doesn't add -std=c++17 flag. Is it possible to make the nvcc test honor CMAKE_CUDA_STANDARD?