Visual Studio nvcc command line does not match project options

I’ve been building my CUDA project successfully for both debug and release, but suddenly I can no longer build release code.

After pulling my hair out for a day, I notice that even though the project options are set for no debug info, the command line when compiling includes the -G option for debug info.

Has anyone seen this before and know how to get the command line to match the project options again?

I’ve tried copying command line to a cmd window and editing to remove the -G, but that seems to not work easily.

OK, I’ve discovered there are 2 places where the debug flag (-G) is set. I’ve always only used the project settings, but somehow the debug settings for the file got changed.

Editing File-Properties for the .cu file and set to no debug fixed the problem.