From the Cuda 10 release notes:
The following compilers are supported as host compilers in nvcc:
Clang 6.0
Microsoft Visual Studio 2017* (RTW, Update 8 and later)
Xcode 9.4
XLC 16.1.x
ICC 18
PGI 18.x (with -std=c++14 mode)
*Starting with CUDA 10.0, nvcc supports all versions of Visual Studio 2017 (past and upcoming
updates)