CUDA compile problems on Windows, Cmake error: No CUDA toolset found

I have tried it on a different PC now and it works fine. So I had absolutely no idea why it's not working on this one. As CUDA_PATH is correctly setup in my system variables.

Then looking into it further, by uninstalling the 'Build Tools' of Visual Studio and only having the Community IDE installed, CMake used the IDE instead of the Build Tools and then it started working fine.

Look at this. It may solve your issues.

Seems like Nvidia cuda installer has some issues with installing the VS integration with vs 2017. Check if you can find this file in your vs installing path.

C:/Program Files (x86)/Microsoft Visual