CUDA build setting

When building .cu and .cuh files on Visual Studio, are the following settings necessary?

  • Item Type ⇒ CUDA C/C++

I asked because the build is successful even when the item type for the .cu and .cuh files is “C/C++ Compiler”.

You can also do it with custom build steps depending on how your project is configured.