【发布时间】:2013-10-04 01:19:01
【问题描述】:
我想为我的 CUDA 源文件生成头文件依赖项,以将其包含到 makefile 中。
我尝试使用以下代码:
g++ -MM my_cuda_file.cu
这适用于 .cpp 和 .h 文件,但对于 .cu 文件,我只会收到以下错误:
g++: warning: my_cuda_file.cu: linker input file unused because linking not done
我怎样才能让它工作?
我也尝试了以下代码,但它们都不起作用:
nvcc -MM my_cuda_file.cu
nvcc -Xcompiler "-MM" my_cuda_file.cu
【问题讨论】: