]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] fix linker problem in lib/cc unit test
authorJelte Jansen <jelte@isc.org>
Wed, 11 Apr 2012 23:33:15 +0000 (23:33 +0000)
committerJelte Jansen <jelte@isc.org>
Wed, 11 Apr 2012 23:33:15 +0000 (23:33 +0000)
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)

src/lib/cc/tests/Makefile.am

index 476085582c49f3f82098318402151b7eb11ac1f0..08b7f33a5a5853a1cf3e0e663b304665cd3d8b37 100644 (file)
@@ -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