VS/CUDA: nvcc < 12.4 does not work with VS 17.10
Recently Microsoft released Visual Studio 2022 version 17.10, which defines _MSC_VER to be 1940. Versions of CUDA <12.4 check the value of _MSC_VER and will not proceed unless the nvcc compiler is passed the argument --allow-unsupported-compiler
. When attempting to pass that argument using the CMAKE_CUDA_FLAGS
variable or the CMAKE_CUDA_FLAGS_INIT
variable cmake is still unable to detect the compiler.