[CMake] Reexecute cmake to update build.make
gga
ggarra at advancedsl.com.ar
Thu Jun 7 09:47:17 EDT 2007
Mathieu Malaterre wrote:
> Example, your foo.i depends on bla.h. First time your configure,
> dependency will be right, for instance:
>
> Makefile:
> ...
> foo_wrap.cpp: foo.i
> foo_wrap.cpp: bla.h
> <tab>swig -o foo_wrap.cpp foo.i
>
> but now edit your foo.i file and add a new header file 'bar.h'. There
> is absolutely nothing in the Makefile that will say 'Hey rebuild
> foo_wrap.cpp, because it now depends on bar.h'
>
Sure there is, even without those files I gave you.
foo.so depends on foo.obj
foo.obj depends on foo_wrap.cxx
foo_wrap.cxx depends on foo.i
when foo.i changes on disk (you added bar.h), foo_wrap.cxx gets
regenerated and recompiled.
What's missing by default in cmake is:
foo.i depends on bla.h and other.i (this is what swig -MF gives you)
so that whenever bla.h or other.i changes, so does foo.so.
With the files I gave you and a proper swig with dependencies (ie. swig
-MF), you should get that too. Works beautifully.
--
Gonzalo Garramuño
ggarra at advancedsl.com.ar
AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy
More information about the CMake
mailing list