views:

201

answers:

1

I am using GNU autotools to build cuda project. CUDA files are regular C++ files as far as preprocessor is concerned, however they use .cu extension and must use nvcc compiler which is g++ based NVIDIA compiler. This breaks regular dependency tracking, .deps directories are not populated. This means that if .cu file includes another file, changes to include file do not trigger recompilation of .cu file.

how can I modify my Makefile.am/configure.ac to enable tracking dependency for .cu files. Thanks

+1  A: 

Try writing an implicit ".cu.cc" rule for generating C++ files from the CUDA files. Automake should then be able to track the dependencies of the .cc files, which should reflect back on the CUDA files.

Steve Emmerson