From 7d3df42bb5eefc740724537d802597668ab1a955 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Tue, 10 Feb 2009 21:38:44 +0000 Subject: [PATCH] cpp: Fix "make check" by defining a comparator for "Empty" The TCompactProtocol revision added a "set" in DebugProtoTest. C++ needs a comparator in order to link this. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743111 13f79535-47bb-0310-9956-ffa450edef68 --- test/DebugProtoTest_extras.cpp | 13 +++++++++++++ test/Makefile.am | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/DebugProtoTest_extras.cpp diff --git a/test/DebugProtoTest_extras.cpp b/test/DebugProtoTest_extras.cpp new file mode 100644 index 00000000..b1178a32 --- /dev/null +++ b/test/DebugProtoTest_extras.cpp @@ -0,0 +1,13 @@ +// Extra functions required for DebugProtoTest_types to work + +#include "gen-cpp/DebugProtoTest_types.h" + + +namespace thrift { namespace test { namespace debug { + +bool Empty::operator<(Empty const& other) const { + // It is empty, so all are equal. + return false; +} + +}}} diff --git a/test/Makefile.am b/test/Makefile.am index 5f2ce8da..cc92ce00 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -19,7 +19,8 @@ libtestgencpp_la_SOURCES = \ gen-cpp/ThriftTest_constants.cpp \ gen-cpp/ThriftTest.cpp \ gen-cpp/ThriftTest_types.cpp \ - ThriftTest_extras.cpp + ThriftTest_extras.cpp \ + DebugProtoTest_extras.cpp libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la -- 2.17.1