CUDA Build Rule for Visual Studio 2010 ?

It seems that Visual Studio 2010 use MSBuild for C++. And the build rule in CUDA SDK can’t work on it.
Is there any existing build rule for VS2010 or some simple ways to make VS automatically use nvcc for *.cu? It’s a tiring work to set each *.cu file separately. :confused:

I noticed that nvcc requires older cl. Maybe this is your problem, because if you are in VS2010 trying to nvcc path is set to vs2010 compiler. You could create some wrapper for nvcc which would set paths to correct compiler.

Otherwise I am using nvcc as post build rule and bundling cubin as resource into exe and that works.

You can make VS2010 to use v9.0 compiler sets in the project settings.

Actually I’m wondering if there’s some easy way to make VS2010 use nvcc as default build tool for *.cu

Yes I am writing about it, you can use it as custom build rule but you have to probably make that wrapper, because it must use different compiler than in path.

Yesterday I was trying it and it should work.