summaryrefslogtreecommitdiff
path: root/lib/cpp
diff options
context:
space:
mode:
authorBen Craig <bencraig@apache.org>2015-07-06 08:40:35 -0500
committerBen Craig <bencraig@apache.org>2015-07-06 08:40:35 -0500
commit7207c22f9d50ee28ea8c0842404541524bde8bcd (patch)
treee48a7723ef39a397af745fef89c24b7d88976076 /lib/cpp
parent6e4037656885132a44407fb7d66f6d034b379376 (diff)
downloadthrift-7207c22f9d50ee28ea8c0842404541524bde8bcd.tar.gz
THRIFT-2850 CMake for Apache Thrift
Client: Cpp Patch: Ben Craig This closes #534
Diffstat (limited to 'lib/cpp')
-rwxr-xr-xlib/cpp/CMakeLists.txt9
-rw-r--r--lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp2
-rw-r--r--lib/cpp/src/thrift/async/TEvhttpServer.cpp2
-rw-r--r--lib/cpp/src/thrift/server/TNonblockingServer.h2
-rw-r--r--lib/cpp/test/TNonblockingServerTest.cpp8
5 files changed, 17 insertions, 6 deletions
diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index 84509a333..b97e356c2 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -34,7 +34,6 @@ set(SYSLIBS "")
set( thriftcpp_SOURCES
src/thrift/TApplicationException.cpp
src/thrift/TOutput.cpp
- src/thrift/VirtualProfiling.cpp
src/thrift/async/TAsyncChannel.cpp
src/thrift/concurrency/ThreadManager.cpp
src/thrift/concurrency/TimerManager.cpp
@@ -57,7 +56,6 @@ set( thriftcpp_SOURCES
src/thrift/transport/TTransportUtils.cpp
src/thrift/transport/TBufferTransports.cpp
src/thrift/server/TConnectedClient.cpp
- src/thrift/server/TServer.cpp
src/thrift/server/TServerFramework.cpp
src/thrift/server/TSimpleServer.cpp
src/thrift/server/TThreadPoolServer.cpp
@@ -88,6 +86,13 @@ if (WIN32)
src/thrift/windows/OverlappedSubmissionThread.cpp
)
endif()
+else()
+ # These files evaluate to nothing on Windows, so omit them from the
+ # Windows build
+ list(APPEND thriftcpp_SOURCES
+ src/thrift/VirtualProfiling.cpp
+ src/thrift/server/TServer.cpp
+ )
endif()
# If OpenSSL is not found just ignore the OpenSSL stuff
diff --git a/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp b/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
index bcb87cdf0..1279bc690 100644
--- a/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
+++ b/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
@@ -19,6 +19,8 @@
#include <thrift/async/TEvhttpClientChannel.h>
#include <evhttp.h>
+#include <event2/buffer.h>
+#include <event2/buffer_compat.h>
#include <thrift/transport/TBufferTransports.h>
#include <thrift/protocol/TProtocolException.h>
diff --git a/lib/cpp/src/thrift/async/TEvhttpServer.cpp b/lib/cpp/src/thrift/async/TEvhttpServer.cpp
index 93fb479d1..57d0d6120 100644
--- a/lib/cpp/src/thrift/async/TEvhttpServer.cpp
+++ b/lib/cpp/src/thrift/async/TEvhttpServer.cpp
@@ -21,6 +21,8 @@
#include <thrift/async/TAsyncBufferProcessor.h>
#include <thrift/transport/TBufferTransports.h>
#include <evhttp.h>
+#include <event2/buffer.h>
+#include <event2/buffer_compat.h>
#include <iostream>
diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.h b/lib/cpp/src/thrift/server/TNonblockingServer.h
index aacb492e6..4fb83f1e0 100644
--- a/lib/cpp/src/thrift/server/TNonblockingServer.h
+++ b/lib/cpp/src/thrift/server/TNonblockingServer.h
@@ -38,6 +38,8 @@
#include <unistd.h>
#endif
#include <event.h>
+#include <event2/event_compat.h>
+#include <event2/event_struct.h>
namespace apache {
namespace thrift {
diff --git a/lib/cpp/test/TNonblockingServerTest.cpp b/lib/cpp/test/TNonblockingServerTest.cpp
index 4aa4c284a..948809109 100644
--- a/lib/cpp/test/TNonblockingServerTest.cpp
+++ b/lib/cpp/test/TNonblockingServerTest.cpp
@@ -46,7 +46,7 @@ struct Handler : public test::ParentServiceIf {
class Fixture {
private:
- struct Runner : public concurrency::Runnable {
+ struct Runner : public apache::thrift::concurrency::Runnable {
boost::shared_ptr<server::TNonblockingServer> server;
bool error;
virtual void run() {
@@ -80,8 +80,8 @@ protected:
}
int startServer(int port) {
- boost::scoped_ptr<concurrency::ThreadFactory> threadFactory(
- new concurrency::PlatformThreadFactory(
+ boost::scoped_ptr<apache::thrift::concurrency::ThreadFactory> threadFactory(
+ new apache::thrift::concurrency::PlatformThreadFactory(
#if !USE_BOOST_THREAD && !USE_STD_THREAD
concurrency::PlatformThreadFactory::OTHER,
concurrency::PlatformThreadFactory::NORMAL,
@@ -128,7 +128,7 @@ protected:
private:
boost::shared_ptr<event_base> userEventBase_;
boost::shared_ptr<test::ParentServiceProcessor> processor;
- boost::shared_ptr<concurrency::Thread> thread;
+ boost::shared_ptr<apache::thrift::concurrency::Thread> thread;
protected:
boost::shared_ptr<server::TNonblockingServer> server;