[CMake] Swig dependencies not being tested?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Dec 10 01:15:02 EST 2007


On 2007-12-10 05:33+0100 Christiaan Putter wrote:

> Hi all,
>
> I know swig support isn't all that great at the moment but was wondering if
> someone happens to have a working Swig module for cmake that doesn't rebuild
> every time even without the dependencies having changed.

I do confirm that is a problem, and I hope somebody fixes it.

>
> Someone else also pointed out a problem with .i files having to be in the
> current source dir.

We have never felt constrained by that limitation (in fact I was unaware of
it) since it is possible to specify just one *.i file in the current source
directory that then includes *.i files from elsewhere in the source tree.

For example our principal library has an API defined
in ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i which is used
by our two separate swig-generated (python and java) interfaces as follows:

Both the bindings/java/CMakeLists.txt file and its python equivalent
put ${CMAKE_SOURCE_DIR}/bindings/swig-support in the INCLUDE_DIRECTORIES
list.  Then both java/plplotjavac.i and its python equivalent contain
the following line:

%include plplotcapi.i

which conveniently includes the bulk of the *.i information from
one common place in the source tree for our two separate swig-generated
interfaces.

Despite the convenience of this approach, others will have different needs
that would best be served by allowing the initial *.i file (that includes
the rest of the *.i files) to be somewhere else than the current source
directory so on these general grounds I hope this limitation is removed
at the same time as when the dependency problem is fixed.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list