swig-fortran / swig

This fork of SWIG creates Fortran wrapper code from C++ headers.
http://www.swig.org
Other
42 stars 11 forks source link

Prevent multiple `use` statements from multiple `%import`s #106

Closed sethrj closed 5 years ago

sethrj commented 5 years ago

If module c imports modules b and a, and b also imports a, then the c.f90 file will include two import statements for module a.

sethrj commented 5 years ago

I can't reproduce this.

sethrj commented 5 years ago

I did end up reproducing this: the issue is that two different relative paths resolved to the same file.

sethrj commented 5 years ago

This is really a defect in SWIG's path handling (%include "foo.i" and %include "../blah/foo.i" could include the same file twice). Marking as "won't fix"...