I am experiencing a problem configuring a C++/CUDA project under Windows 10 / VS 2019 / CMake 3.20.1 (and a bunch of previous versions)
The PC has installed CUDA 11.2 and no trace of CUDA 10.2 (not under Program files not any environment variable).
A CMakeLists script with an ENABLE_LANGUAGE(CUDA) statement finds the CUDA 11.2 nvcc compiler, but then selects CUDA 10.2 (which is not present on the system). If I manually change the value of the path to CUDA, CMake will still overwrite it with a path to version 10.2. I have tried also defining CUDA_TOOLKIT_ROOT_DIR but to no avail.
I am attaching a screenshot, as I think it shows interesting information.
Has anyone encountered similar problems?
Thanks for any advise,