Excluding cuda cu files from being build on non-GPU machines Making a Visual Studio project buildabl

Hi there!

I have a rather large Visual Studio 2005 project including a few CUDA files. However, the project is meant to be compiled also on non-GPU machines - without excluding all files manually from being built. Of course calling GPU functions is prevented with preprocessor definitions.

My first idea was to modify the cuda build rule. But honestly, I have no idea if that is possible in a proper way. One has to distinguish between GPU and non-GPU machines in the build rule (maybe using path variables?). Is that possible?

Did anyone do anything like that before? I am thankful for any hints.