[cgma-dev] Linking to iGeom
Jed Brown
jed at 59A2.org
Tue Jan 12 14:17:52 CST 2010
Note that overlinking should be avoided when working with shared libs,
e.g. link with *only* -L/path/to/lib -liMesh (with
-Wl,-rpath=/path/to/lib when you want it). With static libs, you have
no choice but to link the recursive dependencies, but then RPATH is
irrelevant. It would be nice to have a MOAB/CGM configure option to
install with RPATH, there is probably a way to have autotools do the
RPATH rewriting (so they work from the build directory too).
On my system, IGEOM_LDFLAGS includes lots of system paths which can
cause order dependence and breakage (because these paths should be
searched last, but will be searched earlier when given explicitly).
FWIW, I have a FindITAPS.cmake which attempts to link only interface
libs, falling back to specifying everything if required (normally only
with static libs). It's only tested on a couple local systems, but I
can make changes if it doesn't work for you.
http://github.com/jedbrown/cmake-modules
Jed
More information about the cgma-dev
mailing list