[font=“Courier New”]-gencod[/font]e results in a separate compiler invocation for each of the given [font=“Courier New”]code=[/font] arguments. So in your case the compiler is invoked four times to compiles the device code and a fifth time to generate the host code. If a warning is provoked by device code, it is thus emitted four times.
You can remove architectures you are not using to speed up compilation.
That is right. Thanks for the clarification. I did not realize that the default Makefile that comes with the SDK examples generates code in sm_10, sm_20, compute_10, compute_20.
I turned off the compilation for all other modes except sm_20.
The overall compilation speed issue still remains (nvcc vs g++). But not too critical at this point.