How to set include path once for nvcc?

Does anyone know how I can include additional dirs in the include path for nvcc without having to modify the custom build step for every single .cu file in every project? I’m trying to include things like windows.h. I’d prefer not to have to copy those dirs under the CUDA SDK dir tree.

thanks
Mark

In Visual Studio 2005:

Tools->Options->Projects and Solutions->VC++ Directories

For each of the following options in the “Show Directories For” dropdown:

Executable Files:

  • Add C:\CUDA\bin

Include Files:

  • (If on Win32) Add C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc
  • (If on Win64) Add C:\Program Files (x86)\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc

Library Files:

  • Add C:\CUDA\lib
  • (If on Win32) Add C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\lib
  • (If on Win64) Add C:\Program Files (x86)\NVIDIA Corporation\NVIDIA CUDA SDK\common\lib

Thanks for the suggestion but that’s not quite my problem. I could build most projects but not those which required external include files. It appears that the nvcc custom build step does not use the VS include path and, as far as I can see, that means that I need to change the nvcc custom build steps’ command line in every relevant project to pickup the include files. Which is horrible.

NVIDIA provided me with the answer to this. In the common/scripts dir there is a rules file. If you load this into your project you can then modify the include path using the custom build steps configuration dialogue. I’m still not sure how to set the custom rule across all projects but this is good enough for me.