On Sun, Nov 20, 2011 at 09:48:10PM -0000, Garth Wells wrote:
> On 20 November 2011 21:38, Anders Logg <email address hidden> wrote:
> > Which order is that?
> >
>
> The order that CMake uses when building.
>
> > Is the problem the reversal of the order of libs when PKG_LINKFLAGS is
> > build in dolfin/CMakeLists.txt?
> >
>
> Probably. We could use the trick that I added for Trilinos - reverse
> the order of the set.
On Sun, Nov 20, 2011 at 09:48:10PM -0000, Garth Wells wrote: CMakeLists. txt?
> On 20 November 2011 21:38, Anders Logg <email address hidden> wrote:
> > Which order is that?
> >
>
> The order that CMake uses when building.
>
> > Is the problem the reversal of the order of libs when PKG_LINKFLAGS is
> > build in dolfin/
> >
>
> Probably. We could use the trick that I added for Trilinos - reverse
> the order of the set.
Isn't it just a matter of changing the line
set(PKG_LINKFLAGS "${_linkflags} ${PKG_LINKFLAGS}")
to
set(PKG_LINKFLAGS "${PKG_LINKFLAGS} ${_linkflags} ${PKG_LINKFLAGS}")
?
--
Anders
> Garth TARGET_ LINK_LIBRARIES} ) a|so|dylib| dll)" "-L\\1 -l\\2" ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~ /bugs.launchpad .net/dolfin/ +bug/892793/ +subscriptions
>
> >
> > # Convert libraries to -L<libdir> -l<lib> form
> > foreach(_lib ${DOLFIN_
> > string(REGEX REPLACE "(.?:?/[^ ]*)/lib([^ ]*)\\.(
> > _linkflags
> > "${_lib}"
> > )
> >
> > # Only add libraries that matches the form -L<libdir> -l<lib>
> > if ("${_linkflags}" MATCHES "-L.+ -l.+")
> > set(PKG_LINKFLAGS "${_linkflags} ${PKG_LINKFLAGS}")
> > ~~~~~~~
> > endif()
> > endforeach()
> >
> >
> > Title:
> > dolfin.pc does not respect library order
> >
> > To manage notifications about this bug go to:
> > https:/
> >
>