Skip to content

Visual Studio Generator not detecting CUDA 11.0 RC nvcc.

CUDA 11.0 RC has been released

Under linux, cmake correctly identifies CUDA 11.0 and is usable.

Under Windows using the Visual Studio generator CMake fails to find the CUDA compiler (Windows Server 2019 with Visual Studio 2019, and Windows Server 2016 with Visual Studio 2017).

CMakeOutput.log reports:

Failed to detect CUDA nvcc include information:
  no 'INCLUDES=' string found in nvcc output:

although within CMakeError.log there is an INCLUDES line present:

  #$ INCLUDES="-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin/../include"  

This is using CUDA 11.0.167, and CMake 3.17.2.

The log can be seen on my github actions. The "Configure Error Processing" step cat's CMakeOutput.log and CMakeErrors.txt

Edit

Just spotted that the build is actually failing due to cuda_runtime.h being unavailable

fatal error C1083: Cannot open include file: 'cuda_runtime.h': No such file or directory

even though the include directory is being passed to nvcc

-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include"
Edited by Peter Heywood
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information