VisualStudio Source Dependencies and Compile Time

Hi!

I just migrated a rather large CUDA based project from linux to Windows using VisualStudio 2008 and CUDA 4.0.

I am now facing the problem that:

  • I woudl have to specify the additional source dependencies explicitely in the properties of the .cu file.
    This is infeasible in our project and error prone.
  • compile for a .cu file is incredibly slow
  • I cannot compile multiple .cu files in parallel, only 1 kernel out of 12 is used
    (for the VC++ compiler I use the /MP switch)

As a result the compile time for the project is ~ 4 minutes and 95% of it are for .cu files which make up ~ 25% of the code.
In addition, changing any CUDA related header file results in 4 min compile time … just to make sure everything is up to date.

Is there a tool to automatically generate the source dependencies for a .cu file?
Searching the internet I could not find anything.

I could solve the issue with the parallel copiles by splitting the solution into multiple projects generating libraries that then link.
This would however not solve the source dependency issue and just splitting up the projects as a workaround is rather unsatisfactory
and a waist of time.

Rolf