We all know that in (any version of) visual studio whenever an included header file changes for a source file, this source file is rebuilt when “BUILD SOLUTION (F7)” is pressed. However, for NVCC this does not work. External Image
This is very annoying for (at least) two reasons
- You change a header file included in your .cu and the cubin is not rebuilt. If you are not careful you end up running your binary with stale code
- Usually this could (partly) be solved by creating multiple .cu files, which, when change are properly recognised and rebuilt. However, nvcc does NOT have support for linking multiple .cu files together, everyhing has to be in one file (or included therein) (*).
Is there some way to force the dependency analysis of Visual Studio to be active for CUDA files as well? Is this some issue with MSVC, or can a future update of CUDA solve this somewhow?
[*]Error: External calls are not supported (found non-inlined call to …)