On Thu, 16 Jan 2014 09:47:32 +0100 Johannes Ring <[email protected]> wrote:
> On Wed, Jan 15, 2014 at 2:20 PM, Jan Blechta > <[email protected]> wrote: > > On Tue, 14 Jan 2014 17:42:42 +0100 > > Johannes Ring <[email protected]> wrote: > > > >> On Tue, Jan 14, 2014 at 5:06 PM, Jan Blechta > >> <[email protected]> wrote: > >> > Is there a way choosing a SWIG installation if there are > >> > multiple of them on the system? It seems that CMake-built-in > >> > FindSWIG, say > >> > > >> > $CMAKE_ROOT/share/cmake-2.8/Modules/FindSWIG.cmake > >> > > >> > picks one regardless of preset values SWIG_DIR and > >> > SWIG_EXECUTABLE. > >> > >> You should be able to force this by running cmake with > >> -DSWIG_EXECUTABLE:FILEPATH=/path/to/swig. Doesn't that work for > >> you? > > > > Ok, this works. But generated code uses wrong swig version and > > ffc/jitcompiler.py:check_swig_version(compiled_module) raises. > > > > I guess that possible reason is that one my SWIGs has both swig2.0 > > and swig executables while another has only swig. FindSWIG.cmake > > prefers swig2.0 executable. So can -DSWIG_EXECUTABLE be passed to > > cmake when configuring an extension module? > > See attached patch for Instant. I haven't tested it but maybe > something like that will fix this problem? Not sure it is a good fix > though. > > Setting CMAKE_PREFIX_PATH might also help CMake pick the correct swig > binary. Johannes, as I said previously, arranging that preferred SWIG installation has swig2.0 executable makes CMake-built-in FindSWIG.cmake working as expected with either SWIG_DIR or SWIG_EXECUTABLE set. So it is not written optimally as it every time prefers installations which have swig2.0 executable. I think that Johan suggest a correct solution - SWIG is stored within DOLFINConfig. One could go further - DOLFIN could simply pick SWIG found by UFC. Is it possible? Jan > > Johannes _______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
