Re: Generating a parseable #include dependency graph from a project?
Re: Generating a parseable #include dependency graph from a project?
- Subject: Re: Generating a parseable #include dependency graph from a project?
- From: Alan Nilsson <email@hidden>
- Date: Fri, 12 Mar 2010 12:26:08 -0800
Can you use the -M or -MM option in gcc? It will give make style rules but still it would be a centralized view of all the dependencies of each source.
alan
On Mar 12, 2010, at 12:01 PM, Jens Alfke wrote:
> Is there a way to get a textual representation of which files in a project transitively #include which other files? For example, a text file where each line lists a source file path and the the paths of all the headers it depends on.
>
> I'm trying to cut builds times of a huge C++ project I work on; I noticed that a header file I'm editing triggers many hundreds of files to be recompiled when it really shouldn't. I've been weeding out unnecessary #include lines for an hour and have improved the situation quite a bit; but it would be a lot easier if I could write some kind of simple script to parse a dependency file and show me what headers are the most dependent-upon and who's including them.
>
> (I've poked around inside the project and its build/ folder; I'm guessing this info might be in the "imports.pbxtree" file, but it's in some cryptic binary format.)
>
> —Jens _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden