[CMake] Swig dependencies not being tested?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Dec 12 13:31:44 EST 2007


On 2007-12-12 17:17+0100 Tristan Carel wrote:

> On Dec 12, 2007 12:33 AM, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
[...]
>> Tristan, if you decide to create a patch for UseSwig.cmake that does all
>> that for the java case, I would be happy to test it.  However, if it is
>> possible to solve the original gratuitous C rebuild issue for the java
>> interface case without compiling the java files, then that might greatly
>> reduce the changes you have to do for UseSwig.cmake.
>
> As we can't get the exact list of generated files by swig, we won't
> try to guess it, so won't try to build them too :)
>
> I have added an entry at CMake BT:
> http://www.cmake.org/Bug/bug_view_page.php?bug_id=6151
>
> The patch is sensibly different from the previous one: it mainly
> remove the spurious entry
> SET(SWIG_JAVA_EXTRA_FILE_EXTENSION "JNI.java" ".java")
>
> It fixes unecessary rebuilds, whatever the language target.

I just tried your latest patch for UseSWIG.cmake, and indeed it works fine
(original build is fine and redoing make does not rebuild anything) with
PLplot if I add

set_source_files_properties(plplotjavac.i 
PROPERTIES SWIG_MODULE_NAME plplotjavac
)

for the java case

and

set_source_files_properties(plplotcmodule.i 
PROPERTIES SWIG_MODULE_NAME plplotc
)

for the python case.  Thanks a lot for figuring out this unnecessary rebuild
issue for swig with such a minimalistic patch!

> I don't have CVS write access on the modules repository. I will ask Bill
for it.

Good move.

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