views:

98

answers:

3

I have a legacy C++ application with a deep graph of #includes. Changes to any header file often cause recompiles of seemingly unrelated source files.

The application is built using a Visual Studio 2005 solution (sln) file.

Can MSBUILD be invoked in a way that it reports which dependency(ies) are causing a source file to be recompiled?

Is there any other tool that might be able to help?

NOTE: I'm only looking for a tool to tell me why a file would be rebuilt, not some restrospective magic telling me why it was rebuilt.

A: 

You probably need Include Finder (http://www.softpedia.com/progDownload/Include-Finder-Download-83403.html).

Patrick
Patrick, all the links to download Include Finder seem to be broken. Do you have any other link to it?
Seb Rose
+1  A: 

There is a utility called makedepend. It is available on Unix platforms. On Window you can find a similar perl script here.

I do not think MSBUILD takes care of dependency.

Sherwood Hu
+1  A: 

If you dial up the verbosity to detailed or above (Tools>Options>Project>Build or /v:detailed) then MSBuild will log, just before it runs the compiler, exactly what header file or source file caused it to run the compiler.

Is that what you're asking for?

Dan/MSBuild

dan
@Dan, this is pretty much what I was asking for. If I can also tell MSBuild not to run the compiler, that would be better.
Seb Rose