From 5e8f87d4fa0097ef0eb891dcae92d224c192c718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 5 Oct 2012 12:07:01 +0200 Subject: [PATCH] Link Boost.Filesystem explicitly where needed. While libopmcore, following commit 37e14f, depends on (and references) Boost.Filesystem (through the $(BOOST_FILESYSTEM_LIB) macro) this indirect dependency is not sufficient to satisfy the requirements of targets that use the indirect libraries directly. Additional details at https://fedoraproject.org/wiki/UnderstandingDSOLinkChange --- examples/Makefile.am | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/examples/Makefile.am b/examples/Makefile.am index 38d41e22..cb63eb8a 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -7,6 +7,20 @@ $(OPM_BOOST_CPPFLAGS) LDADD = \ $(top_builddir)/lib/libopmcore.la +# Convenience definition for targets that use Boost.Filesystem directly. +# While libopmcore depends on (and references) Boost.Filesystem (through +# the $(BOOST_FILESYSTEM_LIB) macro) this indirect dependency is not +# sufficient to satisfy the requirements of targets that use the indirect +# libraries directly. +# +# Additional details at +# https://fedoraproject.org/wiki/UnderstandingDSOLinkChange +# +LINK_BOOST_FILESYSTEM = \ +$(OPM_BOOST_LDFLAGS) \ +$(BOOST_FILESYSTEM_LIB) \ +$(BOOST_SYSTEM_LIB) + # ---------------------------------------------------------------------- # Declare products (i.e., the example programs). # @@ -28,9 +42,16 @@ wells_example # Please maintain sort order from "noinst_PROGRAMS". refine_wells_SOURCES = refine_wells.cpp + sim_2p_comp_reorder_SOURCES = sim_2p_comp_reorder.cpp +sim_2p_comp_reorder_LDADD = $(LDADD) $(LINK_BOOST_FILESYSTEM) + sim_2p_incomp_reorder_SOURCES = sim_2p_incomp_reorder.cpp +sim_2p_incomp_reorder_LDADD = $(LDADD) $(LINK_BOOST_FILESYSTEM) + sim_wateroil_SOURCES = sim_wateroil.cpp +sim_wateroil_LDADD = $(LDADD) $(LINK_BOOST_FILESYSTEM) + wells_example_SOURCES = wells_example.cpp # ---------------------------------------------------------------------- @@ -42,5 +63,6 @@ noinst_PROGRAMS += spu_2p spu_2p_SOURCES = spu_2p.cpp spu_2p_LDADD = \ $(LDADD) \ +$(LINK_BOOST_FILESYSTEM) \ $(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) endif