Skip to content

Commit

Permalink
Merge packet-ng
Browse files Browse the repository at this point in the history
Conflicts:
	contrib/libvbucket/cJSON.c
	contrib/libvbucket/vbucket.c
	include/libcouchbase/compat.h
	include/libcouchbase/types.h
	include/libvbucket/vbucket.h
	man/bsd/man3/lcb_cntl.3
	man/bsd/man3/lcb_create.3
	man/bsd/man3/lcb_strerror.3
	man/bsd/man3/libcouchbase.3
	man/man3couchbase/lcb_cntl.3couchbase.txt
	man/man3couchbase/lcb_create.3couchbase.txt
	man/man3couchbase/lcb_strerror.3couchbase.txt
	man/man3lib/libcouchbase.3lib.txt
	man/svr4/man3couchbase/lcb_cntl.3couchbase
	man/svr4/man3couchbase/lcb_create.3couchbase
	man/svr4/man3couchbase/lcb_strerror.3couchbase
	man/svr4/man3lib/libcouchbase.3lib
	src/arithmetic.c
	src/bconf_provider.c
	src/compat.c
	src/connect.c
	src/connection_utils.c
	src/flush.c
	src/get.c
	src/http_parse.c
	src/packet.c
	src/remove.c
	src/server.c
	src/server_io.c
	src/server_parse.c
	src/stats.c
	src/store.c
	src/touch.c
	src/verbosity.c

Change-Id: I24862d2c0bb7e6df701089b0ca9810c9a29f635b
Reviewed-on: http://review.couchbase.org/38540
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
  • Loading branch information
mnunberg committed Jun 20, 2014
1 parent ef6a7fe commit 378e2fa
Show file tree
Hide file tree
Showing 569 changed files with 44,629 additions and 53,967 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*.vcxproj.filters
*.vcxproj.user
*~
.DS_Store
._*
.deps/
.libs/
Expand Down Expand Up @@ -55,6 +56,7 @@
/example/observe/observe
/example/syncmode/syncmode
/example/yajl/couchview
filelist.mk
/gtest-1.*
/include/libcouchbase/configuration.h
/libcouchbase*.changes
Expand Down Expand Up @@ -134,7 +136,12 @@
/tests/*.trs
/tests/CouchbaseMock.jar
/tests/check-all
/tests/htparse-tests
/tests/nonio-tests
/tests/unit-tests
/tests/mc-tests
/tests/sock-tests
/tests/rdb-tests
/tools/cbc
/tools/cbc-pillowfight
/tools/cbc_debug.ilk
Expand All @@ -146,6 +153,7 @@ Project.opensdf
Project.sdf
Project.suo
VERSION
build/
cbc-pillowfight.dir/
cbc.dir/
cmake_install.cmake
Expand All @@ -162,3 +170,4 @@ libcouchbase.sdf
libcouchbase.suo
unit-tests.dir/
win32/Debug/
doc/
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ compiler:
- gcc

before_install:
- sudo apt-get -y install libgtest-dev
- sudo apt-get -y install libgtest-dev libssl-dev
- export GTEST_ROOT=/usr/src/gtest
- git config --global user.email "travis@localhost"
- git config --global user.name "Travis CI"
- git tag -a 0.0.$TRAVIS_BUILD_NUMBER -m $TRAVIS_BUILD_NUMBER

script: |
./config/autorun.sh && \
./configure --disable-plugins --enable-warnings && \
make check || cat ./check-all*.log || false
./configure --disable-plugins --enable-warnings --enable-snappy=off && \
make check || cat ./check-all*.log
notifications:
email:
- sergey@couchbase.com
- mark.nunberg@couchbase.com
147 changes: 89 additions & 58 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ SET(COUCHBASE_MOCK_VERSION
# Maven repository where ${COUCHBASE_MOCK_VERSION} is to be found
SET(COUCHBASE_MOCK_DLSERVER
http://files.couchbase.com/maven2/org/couchbase/mock/CouchbaseMock)
SET(HAVE_COUCHBASEMOCK 1)
project(libcouchbase)

OPTION(LCB_NO_TESTS "Disable building of tests" OFF)
OPTION(LCB_NO_TOOLS "Disable building of additional tools" OFF)
OPTION(LCB_NO_PLUGINS "Disable the building of IO plugins for external libs" OFF)
OPTION(LCB_MAINTAINER_MODE "Enables maintainer mode" OFF)
OPTION(LCB_NO_SSL "Do not compile SSL support" OFF)
OPTION(LCB_NO_SNAPPY "Do not compile snappy support" ON)
OPTION(LCB_STATIC_SNAPPY "Use the bundled libsnappy. Do not link with system snappy"
${WIN32})

### END CONFIGURABLES ###
IF(MSVC)
Expand All @@ -57,6 +62,7 @@ INCLUDE(cmake/Modules/GenerateConfigDotH.cmake)
INCLUDE(cmake/Modules/CopyPDB.cmake)
INCLUDE(CheckIncludeFiles)


SET(CPACK_PACKAGE_VERSION_MAJOR "${LCB_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${LCB_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${LCB_VERSION_PATCH}")
Expand Down Expand Up @@ -125,12 +131,10 @@ INCLUDE_DIRECTORIES(BEFORE ${SOURCE_ROOT}/include
# These files are bundled in a static library.
# They export no symbols of their own and may
# be considered as 'static'
IF(WIN32)
SET(lcb_getopt_src win32/getopt.c)
ENDIF()
ADD_LIBRARY(couchbase_utils STATIC
contrib/libvbucket/cJSON.c
src/base64.c
contrib/cJSON/cJSON.c
src/strcodecs/base64.c
src/strcodecs/url_encoding.c
src/gethrtime.c
src/genhash.c
src/hashtable.c
Expand All @@ -140,65 +144,84 @@ ADD_LIBRARY(couchbase_utils STATIC
src/logging.c
src/packetutils.c
src/ringbuffer.c
src/simplestring.c
src/url_encoding.c
${lcb_getopt_src})

SET_TARGET_PROPERTIES(couchbase_utils
PROPERTIES
POSITION_INDEPENDENT_CODE
TRUE
COMPILE_FLAGS "${LCB_CORE_CFLAGS}")
src/simplestring.c)

ADD_SUBDIRECTORY(contrib/libvbucket)
MACRO(LCB_UTIL tgt)
SET_TARGET_PROPERTIES(${tgt}
PROPERTIES
COMPILE_FLAGS "${LCB_CORE_CFLAGS}"
POSITION_INDEPENDENT_CODE TRUE)
ENDMACRO()

ADD_LIBRARY(netbuf STATIC src/netbuf/netbuf.c)
ADD_LIBRARY(mcreq STATIC src/mc/mcreq.c src/mc/compress.c src/mc/forward.c)
ADD_LIBRARY(netbuf-malloc STATIC src/netbuf/netbuf.c)
ADD_LIBRARY(rdb STATIC
src/rdb/rope.c src/rdb/bigalloc.c src/rdb/chunkalloc.c
src/rdb/libcalloc.c)
ADD_LIBRARY(lcbio STATIC
src/lcbio/connect.c src/lcbio/ctx.c src/lcbio/ioutils.c src/lcbio/iotable.c
src/lcbio/protoctx.c src/lcbio/manager.c src/lcbio/ioutils.c src/lcbio/timer.c)
ADD_LIBRARY(lcbht STATIC src/lcbht/lcbht.c contrib/http_parser/http_parser.c)

SET_TARGET_PROPERTIES(netbuf-malloc PROPERTIES COMPILE_DEFINITIONS NETBUF_LIBC_PROXY=1)
LCB_UTIL(netbuf-malloc)
LCB_UTIL(netbuf)
LCB_UTIL(rdb)
LCB_UTIL(lcbio)
LCB_UTIL(couchbase_utils)
LCB_UTIL(mcreq)
LCB_UTIL(lcbht)

ADD_SUBDIRECTORY(src/vbucket)
ADD_SUBDIRECTORY(contrib/cbsasl)
ADD_SUBDIRECTORY(src/ssl)

IF(LCB_NO_SSL)
MESSAGE(STATUS "SSL support will be disabled")
ADD_DEFINITIONS(-DLCB_NO_SSL=1)
ENDIF()

IF(LCB_BUILD_STATIC)
SET(_lcb_linkspec STATIC)
ELSE()
SET(_lcb_linkspec SHARED)
ENDIF()

SET(LCB_OPFILES
src/operations/arithmetic.c src/operations/get.c src/operations/touch.c
src/operations/observe.c src/operations/durability.c src/operations/store.c
src/operations/stats.c src/operations/remove.c src/operations/pktfwd.c)

ADD_LIBRARY(couchbase ${_lcb_linkspec}
contrib/http_parser/http_parser.c
src/arithmetic.c
src/bconf_provider.c
${LCB_OPFILES}
src/bootstrap.c
src/bucketconfig/bc_cccp.c
src/bucketconfig/bc_http.c
src/bucketconfig/bc_file.c
src/bucketconfig/confmon.c
src/callbacks.c
src/cntl.c
src/compat.c
src/connmgr.c
src/durability.c
src/dsn.c
src/error.c
src/flush.c
src/get.c
src/handler.c
src/http.c
src/http_io.c
src/http_parse.c
src/getconfig.c
src/http/http.c
src/http/http_io.c
src/instance.c
src/connect.c
src/connection_utils.c
src/readwrite.c
src/mcserver/negotiate.c
src/mcserver/mcserver.c
src/newconfig.c
src/iofactory.c
src/observe.c
src/packet.c
src/remove.c
src/retryq.c
src/retrychk.c
src/sanitycheck.c
src/server.c
src/server_negotiate.c
src/server_io.c
src/server_parse.c
src/stats.c
src/store.c
src/settings.c
src/synchandler.c
src/timer.c
src/timings.c
src/touch.c
${CMAKE_BINARY_DIR}/dllversion.rc
src/utilities.c
src/verbosity.c
src/wait.c)

SET_TARGET_PROPERTIES(couchbase
Expand All @@ -209,10 +232,31 @@ SET_TARGET_PROPERTIES(couchbase
VERSION "2"
SOVERSION "2.0.14")

IF(NOT LCB_NO_SNAPPY)
IF(LCB_STATIC_SNAPPY)
MESSAGE(STATUS "Will use embedded libsnappy")
ADD_SUBDIRECTORY(contrib/snappy)
SET(LCB_SNAPPY_LINK lcbsnappy)
ELSE()
INCLUDE(cmake/Modules/FindCouchbaseSnappy.cmake)
IF(NOT SNAPPY_FOUND)
MESSAGE(FATAL_ERROR "Snappy not found and building with dynamic snappy requested")
ELSE()
SET(LCB_SNAPPY_LINK ${SNAPPY_LIBRARIES})
INCLUDE_DIRECTORIES(${SNAPPY_INCLUDES})
ENDIF()
ENDIF()
ELSE()
MESSAGE(STATUS "Compression support will be disabled")
ADD_DEFINITIONS(-DLCB_NO_SNAPPY=1)
SET(LCB_SNAPPY_LINK "")
ENDIF()

SET_TARGET_PROPERTIES(couchbase PROPERTIES PREFIX "lib")
SET_TARGET_PROPERTIES(couchbase PROPERTIES IMPORT_PREFIX "lib")
TARGET_LINK_LIBRARIES(couchbase
couchbase_select couchbase_utils vbucket cbsasl ${lcb_plat_libs})
couchbase_select couchbase_utils vbucket mcreq netbuf cbsasl lcbio rdb lcbht
${lcb_plat_libs} ${lcb_ssl_libs} ${LCB_SNAPPY_LINK})


IF(NOT LCB_NO_TESTS)
Expand All @@ -233,6 +277,7 @@ IF(NOT LCB_NO_PLUGINS AND NOT WIN32)
ENDIF()
ENDIF()


IF(LCB_MAINTAINER_MODE)
IF(NOT (HAVE_LIBEV AND HAVE_LIBEVENT AND HAVE_LIBUV))
MESSAGE(FATAL_ERROR "Maintainer mode requires all plugins to be present")
Expand All @@ -247,22 +292,8 @@ INSTALL(TARGETS couchbase
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

INSTALL(FILES include/libcouchbase/arguments.h
include/libcouchbase/assert.h
include/libcouchbase/behavior.h
include/libcouchbase/callbacks.h
include/libcouchbase/cntl.h
include/libcouchbase/compat.h
include/libcouchbase/couchbase.h
include/libcouchbase/durability.h
include/libcouchbase/error.h
include/libcouchbase/http.h
include/libcouchbase/sanitycheck.h
include/libcouchbase/sysdefs.h
include/libcouchbase/timings.h
include/libcouchbase/types.h
include/libcouchbase/visibility.h
${LCB_GENSRCDIR}/libcouchbase/configuration.h
DESTINATION include/libcouchbase)
FILE(GLOB LCB_PKGHDRS include/libcouchbase/*.h)
INSTALL(FILES ${LCB_PKGHDRS} ${LCB_GENSRCDIR}/libcouchbase/configuration.h
DESTINATION include/libcouchbase)

INSTALL_PDBS(couchbase)
Loading

0 comments on commit 378e2fa

Please sign in to comment.