Generating a parseable #include dependency graph from a project?
Generating a parseable #include dependency graph from a project?
- Subject: Generating a parseable #include dependency graph from a project?
- From: Jens Alfke <email@hidden>
- Date: Fri, 12 Mar 2010 12:01:30 -0800
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