[CMake] Intended behavior; header files in directory change should cause rebuild?

David Cole david.cole at kitware.com
Tue Jun 21 07:18:00 EDT 2011


On Tue, Jun 21, 2011 at 5:11 AM, J Decker <d3ck0r at gmail.com> wrote:

> Okay I have many many projects and targets using cmake to build them.
>
> I target openwatcom stock install, mingw stock install, and vs2010
> stock install + cmake + my sources
>
> Often when I make a change to sack/includes/*.h everything rebuilds
> appropriately.
> If I change a header in a library that's local and included with
> "something.h" (?I think?) I don't know specifically which
> misbehave.... but before I declare it's a fault, I wondered if header
> dependancies were something that cmake was supposed to make rules for.
>
> It's gotten me a couple times recently where I made a change in a
> header that didn't cause a recompile.  I think I have a candidate that
> demonstrates it if I need to look into it further?
>
> On Tue, Jun 21, 2011 at 2:02 AM, Michael Wild <themiwi at gmail.com> wrote:
> > On 06/21/2011 10:51 AM, J Decker wrote:
> >> header files in directory change should cause rebuild?
> >> Doesn't cmake parse the c files for includes and auto build header
> dependancies?
> >
> >
> > Sorry, can you rephrase your question? Preferably using complete
> > sentences, so people are actually are able to follow...
> >
> >
> > Micheal
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
> >
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>

CMake generates makefiles that have dependency info in them based on a
built-in dependency scanner that looks for "#include" lines in source files.
But for build systems like Xcode and Visual Studio, it trusts those systems
to do the scanning without doing that scanning.

So... is your problem with the makefile based build trees, or the Visual
Studio build tree? If Visual Studio, complain to Microsoft. If makefile,
then give some more info so we can figure out where the problem is.


Thx,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110621/30643762/attachment-0001.htm>


More information about the CMake mailing list