Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for builds against newer versions of Thrift (up until 0.13) #21

Merged
merged 1 commit into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ target_link_libraries(charybdefs charybde_lib)
target_link_libraries(charybdefs server)
target_link_libraries(charybdefs ${FUSE_LIBRARIES})
target_link_libraries(charybdefs pthread)
target_link_libraries(charybdefs event)
target_link_libraries(charybdefs ${THRIFT_LIBS})
3 changes: 2 additions & 1 deletion FindThrift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ find_path(THRIFT_STATIC_LIB_PATH libthrift.a PATHS ${THRIFT_LIB_PATHS})

# prefer the thrift version supplied in THRIFT_HOME
find_library(THRIFT_LIB NAMES thrift HINTS ${THRIFT_LIB_PATHS})
find_library(THRIFT_NB_LIB NAMES thriftnb HINTS ${THRIFT_LIB_PATHS})

find_program(THRIFT_COMPILER thrift
$ENV{THRIFT_HOME}/bin
Expand All @@ -52,7 +53,7 @@ find_program(THRIFT_COMPILER thrift

if (THRIFT_LIB)
set(THRIFT_FOUND TRUE)
set(THRIFT_LIBS ${THRIFT_LIB})
set(THRIFT_LIBS ${THRIFT_LIB} ${THRIFT_NB_LIB})
set(THRIFT_STATIC_LIB ${THRIFT_STATIC_LIB_PATH}/libthrift.a)
exec_program(${THRIFT_COMPILER}
ARGS -version OUTPUT_VARIABLE THRIFT_VERSION RETURN_VALUE THRIFT_RETURN)
Expand Down
2 changes: 1 addition & 1 deletion server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
using namespace ::apache::thrift::server;

using boost::shared_ptr;
using std::shared_ptr;

struct fault_descriptor {
bool random; // error code must be randomized
Expand Down