From: Jelte Jansen Date: Wed, 11 Apr 2012 23:33:15 +0000 (+0000) Subject: [master] fix linker problem in lib/cc unit test X-Git-Tag: trac2351_base~226^2~116^2~42^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f173bdf07ec3f4d099176dcc6b7f878b218fb93a;p=thirdparty%2Fkea.git [master] fix linker problem in lib/cc unit test move GTEST_LDADD to the end of the list, so that the source tree libs get linked instead of those installed in the same location as gtest (reviewed on jabber by jinmei) --- diff --git a/src/lib/cc/tests/Makefile.am b/src/lib/cc/tests/Makefile.am index 476085582c..08b7f33a5a 100644 --- a/src/lib/cc/tests/Makefile.am +++ b/src/lib/cc/tests/Makefile.am @@ -24,11 +24,14 @@ run_unittests_SOURCES = data_unittests.cc session_unittests.cc run_unittests.cc run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) -run_unittests_LDADD = $(GTEST_LDADD) -run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la +# We need to put our libs first, in case gtest (or any dependency, really) +# is installed in the same location as a different version of bind10 +# Otherwise the linker may not use the source tree libs +run_unittests_LDADD = $(top_builddir)/src/lib/cc/libcc.la run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la +run_unittests_LDADD += $(GTEST_LDADD) endif