Override nvcc file type interpretation?

I’m setting up a project that uses both mixed C++/CUDA .cu files that will be linked into exe, and also no-C++, CUDA-only .cu files that will be linked into separate .fatbin files. For my team member’s sanity and also for build system purposes, I’d like to distinguish the two intentions with a different file extension. For example: .cu vs .cuda. But, I think nvcc requires the .cu extension and there’s no way to get it to interpret a different file type the same was as a .cu.

Am, I mistaken?



Explicitly specify the language for the input files, rather than letting the compiler choose a default based on the file name suffix.

1 Like