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

Riak 1.2 support #1

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
53 changes: 3 additions & 50 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,52 +1,5 @@
*~
.deps
.dirstamp
.libs
autom4te.cache
config.log
config.status
stamp-h1
stamp-h2
/*.la
*.swp
/build
/doc/
/doxytags.xml
/deps/*.ts
/deps/boost-1.47.0/tools/build/v2/engine/src/bin.*
/deps/protobuf-2.4.1/src/*.o
/deps/protobuf-2.4.1/src/*.lo
/deps/protobuf-2.4.1/src/*.la
/src/cxx/*.o
/src/cxx/*.lo
/src/riakc/*.o
/src/*.o
/src/*.lo
/config.h
/deps/Makefile
/deps/boost-1.47.0/bin.v2/
/deps/boost-1.47.0/tools/build/v2/bjam
/deps/boost-1.47.0/tools/build/v2/b2
/deps/boost-1.47.0/tools/build/v2/bootstrap.log
/deps/boost-1.47.0/tools/build/v2/engine/src/bootstrap/
/deps/protobuf-2.4.1/Makefile
/deps/protobuf-2.4.1/config.h
/deps/protobuf-2.4.1/gtest/Makefile
/deps/protobuf-2.4.1/gtest/build-aux/config.h
/deps/protobuf-2.4.1/gtest/libtool
/deps/protobuf-2.4.1/gtest/scripts/gtest-config
/deps/protobuf-2.4.1/libtool
/deps/protobuf-2.4.1/protobuf-lite.pc
/deps/protobuf-2.4.1/protobuf.pc
/deps/protobuf-2.4.1/src/Makefile
/libtool
/libriak_client.la
/Makefile
/riakc
/riak_client.pc
/riak_cxx_simple_test
/riak_cxx_test_server
/riak_cxx_unit_test
/riak_client/config.h
/test/*.o


.cproject
.project
72 changes: 72 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(riak_client)
SET(RIAK_CLIENT_VERSION 1.0.0)
SET(RIAK_API_VERSION 1.0)

INCLUDE(CTest)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

SET(Boost_USE_MULTITHREADED ON)
FIND_PACKAGE(Boost 1.47 REQUIRED system thread)
FIND_PACKAGE(Protobuf 2.4.1 REQUIRED)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
ADD_DEFINITIONS(-DHAVE_BOOST_SHARED_PTR -DRIAKC_USE_BOOST_SHARED_PTR)

PROTOBUF_GENERATE_CPP(RIAK_PROTO_SOURCES RIAK_PROTO_HEADERS
src/riak_kv.proto
src/riak.proto
src/riak_search.proto)

SET(RIAK_CLIENT_SOURCES
${RIAK_PROTO_SOURCES}
src/client.cpp
src/cxx/basic_client.cpp
src/cxx/connection.cpp
src/cxx/pbc_client.cpp
src/cxx/pbc_header.cpp
src/cxx/pbc_message.cpp
src/cxx/riak_object.cpp
src/cxx/url.cpp
src/string_list.cpp
src/string_map.cpp)

ADD_LIBRARY(riak_client SHARED ${RIAK_CLIENT_SOURCES})
SET_TARGET_PROPERTIES(riak_client PROPERTIES
VERSION ${RIAK_CLIENT_VERSION}
SOVERSION ${RIAK_API_VERSION})
TARGET_LINK_LIBRARIES(riak_client ${PROTOBUF_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY})

ADD_EXECUTABLE(riakc src/riakc/riakc.cpp)
TARGET_LINK_LIBRARIES(riakc riak_client)

ADD_CUSTOM_TARGET(InstallSearchKVHook search-cmd install riak-cxx-test)

INCLUDE(BoostTestTargets)
ADD_BOOST_TEST(TestRiakBasic SOURCES test/test_basic.cpp LIBRARIES riak_client)
ADD_DEPENDENCIES(${TestRiakBasic_TARGET_NAME} InstallSearchKVHook)
ADD_BOOST_TEST(TestRiakObject SOURCES test/test_riak_object.cpp LIBRARIES riak_client)

INCLUDE(GNUInstallDirs)

INSTALL(TARGETS riak_client riakc
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

INSTALL(DIRECTORY riak_client DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/riak_client.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/riak_client.pc"
IMMEDIATE @ONLY)

INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/riak_client.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)

ADD_CUSTOM_TARGET(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
Loading