NVCC --generate-dependencies/-M usage

Hi all,

I have a question regarding nvcc option -M (–generate-dependencies).

While it seems to mimic the gcc’s option -M, it’s usage seems different as it is mutually exclusive with the compilation itself.

I.e. “nvcc --compile -M” yields
nvcc : fatal error : More than one compilation phase specified

Question:
Is there a way of producing a dependency file alongside compilation, or do these need to be two separate steps?