You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by hc...@apache.org on 2014/12/20 12:50:46 UTC
thrift git commit: THRIFT-2906 - linking with
boost_unit_test_framework made more portable
Repository: thrift
Updated Branches:
refs/heads/master 6af074e41 -> ec8d8778b
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
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/ec8d8778
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/ec8d8778
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/ec8d8778
Branch: refs/heads/master
Commit: ec8d8778b51341a7c661f05e3e84465f437fd006
Parents: 6af074e
Author: Konrad Grochowski <hc...@apache.org>
Authored: Sat Dec 20 12:19:00 2014 +0100
Committer: Konrad Grochowski <hc...@apache.org>
Committed: Sat Dec 20 12:50:30 2014 +0100
----------------------------------------------------------------------
configure.ac | 2 ++
lib/cpp/test/Makefile.am | 20 ++++++++++----------
2 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/ec8d8778/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 6d55f8a..5b3d186 100755
--- a/configure.ac
+++ b/configure.ac
@@ -134,6 +134,8 @@ have_cpp=no
if test "$with_cpp" = "yes"; then
AX_BOOST_BASE([1.54.0])
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"
fi
http://git-wip-us.apache.org/repos/asf/thrift/blob/ec8d8778/lib/cpp/test/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index 9ab6ba4..8420357 100755
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -100,7 +100,7 @@ endif
UnitTests_LDADD = \
libtestgencpp.la \
- -l:libboost_unit_test_framework.a
+ $(BOOST_TEST_LDADD)
TransportTest_SOURCES = \
TransportTest.cpp
@@ -108,7 +108,7 @@ TransportTest_SOURCES = \
TransportTest_LDADD = \
libtestgencpp.la \
$(top_builddir)/lib/cpp/libthriftz.la \
- -l:libboost_unit_test_framework.a \
+ $(BOOST_TEST_LDADD) \
-lz
ZlibTest_SOURCES = \
@@ -117,7 +117,7 @@ ZlibTest_SOURCES = \
ZlibTest_LDADD = \
libtestgencpp.la \
$(top_builddir)/lib/cpp/libthriftz.la \
- -l:libboost_unit_test_framework.a \
+ $(BOOST_TEST_LDADD) \
-lz
EnumTest_SOURCES = \
@@ -125,14 +125,14 @@ EnumTest_SOURCES = \
EnumTest_LDADD = \
libtestgencpp.la \
- -l:libboost_unit_test_framework.a
+ $(BOOST_TEST_LDADD)
TFileTransportTest_SOURCES = \
TFileTransportTest.cpp
TFileTransportTest_LDADD = \
libtestgencpp.la \
- -l:libboost_unit_test_framework.a
+ $(BOOST_TEST_LDADD)
#
# TFDTransportTest
@@ -188,9 +188,9 @@ TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp
TNonblockingServerTest_LDADD = libprocessortest.la \
$(top_builddir)/lib/cpp/libthrift.la \
$(top_builddir)/lib/cpp/libthriftnb.la \
+ $(BOOST_TEST_LDADD) \
$(BOOST_LDFLAGS) \
- -levent \
- -l:libboost_unit_test_framework.a
+ -levent
#
# OptionalRequiredTest
@@ -241,16 +241,16 @@ processor_test_SOURCES = \
processor_test_LDADD = libprocessortest.la \
$(top_builddir)/lib/cpp/libthrift.la \
$(top_builddir)/lib/cpp/libthriftnb.la \
+ $(BOOST_TEST_LDADD) \
$(BOOST_LDFLAGS) \
- -levent \
- -l:libboost_unit_test_framework.a
+ -levent
OpenSSLManualInitTest_SOURCES = \
OpenSSLManualInitTest.cpp
OpenSSLManualInitTest_LDADD = \
$(top_builddir)/lib/cpp/libthrift.la \
- -l:libboost_unit_test_framework.a
+ $(BOOST_TEST_LDADD)
#
# Common thrift code generation rules