THRIFT-2906 - linking with boost_unit_test_framework made more portable

Client: C++
Patch: Jon Parise

BOOST_TEST_LDADD Makefile variable added and should be used when linking
with boost_unit_test_framework

This closes #333
This commit is contained in:
Konrad Grochowski 2014-12-20 12:19:00 +01:00
parent 6af074e419
commit ec8d8778b5
2 changed files with 12 additions and 10 deletions

View File

@ -134,6 +134,8 @@ have_cpp=no
if test "$with_cpp" = "yes"; then if test "$with_cpp" = "yes"; then
AX_BOOST_BASE([1.54.0]) AX_BOOST_BASE([1.54.0])
if test "x$succeeded" = "xyes" ; then if test "x$succeeded" = "xyes" ; then
AC_SUBST([BOOST_LIB_DIR], [$(echo "$BOOST_LDFLAGS" | sed -e 's/^\-L//')])
AC_SUBST([BOOST_TEST_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_unit_test_framework.a")])
have_cpp="yes" have_cpp="yes"
fi fi

View File

@ -100,7 +100,7 @@ endif
UnitTests_LDADD = \ UnitTests_LDADD = \
libtestgencpp.la \ libtestgencpp.la \
-l:libboost_unit_test_framework.a $(BOOST_TEST_LDADD)
TransportTest_SOURCES = \ TransportTest_SOURCES = \
TransportTest.cpp TransportTest.cpp
@ -108,7 +108,7 @@ TransportTest_SOURCES = \
TransportTest_LDADD = \ TransportTest_LDADD = \
libtestgencpp.la \ libtestgencpp.la \
$(top_builddir)/lib/cpp/libthriftz.la \ $(top_builddir)/lib/cpp/libthriftz.la \
-l:libboost_unit_test_framework.a \ $(BOOST_TEST_LDADD) \
-lz -lz
ZlibTest_SOURCES = \ ZlibTest_SOURCES = \
@ -117,7 +117,7 @@ ZlibTest_SOURCES = \
ZlibTest_LDADD = \ ZlibTest_LDADD = \
libtestgencpp.la \ libtestgencpp.la \
$(top_builddir)/lib/cpp/libthriftz.la \ $(top_builddir)/lib/cpp/libthriftz.la \
-l:libboost_unit_test_framework.a \ $(BOOST_TEST_LDADD) \
-lz -lz
EnumTest_SOURCES = \ EnumTest_SOURCES = \
@ -125,14 +125,14 @@ EnumTest_SOURCES = \
EnumTest_LDADD = \ EnumTest_LDADD = \
libtestgencpp.la \ libtestgencpp.la \
-l:libboost_unit_test_framework.a $(BOOST_TEST_LDADD)
TFileTransportTest_SOURCES = \ TFileTransportTest_SOURCES = \
TFileTransportTest.cpp TFileTransportTest.cpp
TFileTransportTest_LDADD = \ TFileTransportTest_LDADD = \
libtestgencpp.la \ libtestgencpp.la \
-l:libboost_unit_test_framework.a $(BOOST_TEST_LDADD)
# #
# TFDTransportTest # TFDTransportTest
@ -188,9 +188,9 @@ TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp
TNonblockingServerTest_LDADD = libprocessortest.la \ TNonblockingServerTest_LDADD = libprocessortest.la \
$(top_builddir)/lib/cpp/libthrift.la \ $(top_builddir)/lib/cpp/libthrift.la \
$(top_builddir)/lib/cpp/libthriftnb.la \ $(top_builddir)/lib/cpp/libthriftnb.la \
$(BOOST_TEST_LDADD) \
$(BOOST_LDFLAGS) \ $(BOOST_LDFLAGS) \
-levent \ -levent
-l:libboost_unit_test_framework.a
# #
# OptionalRequiredTest # OptionalRequiredTest
@ -241,16 +241,16 @@ processor_test_SOURCES = \
processor_test_LDADD = libprocessortest.la \ processor_test_LDADD = libprocessortest.la \
$(top_builddir)/lib/cpp/libthrift.la \ $(top_builddir)/lib/cpp/libthrift.la \
$(top_builddir)/lib/cpp/libthriftnb.la \ $(top_builddir)/lib/cpp/libthriftnb.la \
$(BOOST_TEST_LDADD) \
$(BOOST_LDFLAGS) \ $(BOOST_LDFLAGS) \
-levent \ -levent
-l:libboost_unit_test_framework.a
OpenSSLManualInitTest_SOURCES = \ OpenSSLManualInitTest_SOURCES = \
OpenSSLManualInitTest.cpp OpenSSLManualInitTest.cpp
OpenSSLManualInitTest_LDADD = \ OpenSSLManualInitTest_LDADD = \
$(top_builddir)/lib/cpp/libthrift.la \ $(top_builddir)/lib/cpp/libthrift.la \
-l:libboost_unit_test_framework.a $(BOOST_TEST_LDADD)
# #
# Common thrift code generation rules # Common thrift code generation rules