[CMake] How to get generated dependencies

Tom Kacvinsky tom.kacvinsky at vectorcast.com
Wed Jan 13 14:20:00 EST 2016


On Wed, Jan 13, 2016 at 2:09 PM, J Decker <d3ck0r at gmail.com> wrote:

> The short answer is 'no'.

I see depends.internal was generated with the gcc (in my case) option
-MD (or perhaps -MDD).  Ss cmake knows how to do this.  Question: is
this at build time or Makefile generation time?  If the latter, it
would be nice if this could be exposed to the user

> On Wed, Jan 13, 2016 at 10:26 AM, Tom Kacvinsky
> <tom.kacvinsky at vectorcast.com> wrote:
>> On Tue, Jan 12, 2016 at 9:58 AM, Tom Kacvinsky
>> <tom.kacvinsky at vectorcast.com> wrote:
>>> Is there a way of invoking cmake to get the list of non-system header
>>> dependencies, like invoking gcc with -MMD?  I need to find out the
>>> list of non-system header dependencies and I know cmake has a way of
>>> doing this, I just need to know if there is command I can put in the
>>> CMakeLists.txt file to get this information...
>>
>> Is there any way of accessing the generated dependencies?  I know
>> there is a generation phase, but I don't think I can access the files
>> being generated during the generation process is.  Is there a way of
>> doing what I want?  All I need is a list of include included headers
>> (excluding system ones) for a given C++ file.


More information about the CMake mailing list