[CMake] headers and recompile

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Apr 27 09:50:39 EDT 2007


On 4/27/07, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Duncan Mac-Vicar Prett wrote:
> > My .cpp files are not recompiled when I modify the headers, so if I just touch
> > a header, make does nothing.
> >
> > Do I need to include all headers in the source list, or there is a nicer way
> > to inject a dependency?
> >
> > Cheers
> >
> >
> That should work.  In CMakeFiles/target.dir/depend.make where target is
> the name of a library or executable in your project, you should see the
> source level depends that cmake computes for your project.  Perhaps the
> -I or include_directories are not set up so that cmake can find the
> header files, or they are being included in some way that is confusing
> cmake.  If you could create a small example that would help.

Isn't it a matter of simply adding the proper regular expression:

INCLUDE_REGULAR_EXPRESSION

-Mathieu


More information about the CMake mailing list