Remove unused file

Change-Id: I6083b0f45aebd4b8330b98a4d6790aaa096136a6
Reviewed-on: http://review.couchbase.org/42512
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-12391: Hack solution for RPATHs in Go executables

Change-Id: I7597852b9599d0cbb15744761d538e4bb9cfbd74
Reviewed-on: http://review.couchbase.org/42748
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>
Allow cmake to run tests under Valgrind

CTest (part of CMake) can run configured unit tests under Valgrind's
leak checker by specifying "-T Memcheck" to ctest. However for this to
work the CTest module needs to be included in CMakeLists.txt.

Change-Id: Ica7da0902977ca45247cf539f7ea6616316e31eb
Reviewed-on: http://review.couchbase.org/42823
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Chris Hillery <ceej@couchbase.com>
Squash CouchbaseSingleModuleBuild

We're done with the transition to CMake and have a top level
CMakeLists.txt that includes all of the projects.

Change-Id: I9a4e2d997587011813286136806ddabc925fda6b
Reviewed-on: http://review.couchbase.org/42884
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Set variable indicating indicating full build

Some of the modules should work as standalone projects and may
therefore be able to determine between a full build or a module
build.

Change-Id: I25ea2b7afcaa45305ca72346b1d5bd9f4b552ced
Reviewed-on: http://review.couchbase.org/42885
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Add installing go on the vm's

Change-Id: I8085bd97bca2377d3526f6b4c7b77aaac61aeda1
Reviewed-on: http://review.couchbase.org/42924
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-12594: Add goxdcr

Change-Id: I287b206860a416253b3e6187f58d46d44143d2ca
Reviewed-on: http://review.couchbase.org/43007
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>
MB-12594: Pass forestdb info to goxdcr

Change-Id: Ic561721639e1bc658ba2013debc35f0341837e5a
Reviewed-on: http://review.couchbase.org/43011
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>
MB-12601: Switch to query DP4. Add support for -gcflags and "go tool yacc"

Change-Id: I916d8c61209304c0fdd9b8da3503d97513c40df6
Reviewed-on: http://review.couchbase.org/43105
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>
MB-10496: Add jemalloc as a cbdeps dependancy for macosx

Add jemalloc for OS X for use in memory defragmentation (as this is
the first platform which the cbdep has been created for).

Change-Id: I030a0edf24280f3db4edc8c7d6d2205819682818
Reviewed-on: http://review.couchbase.org/42900
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-10496: Add jemalloc as a cbdeps dependancy for Ubuntu

Adds jemalloc cbdeps for Ubuntu 12.04 & 14.04.

Change-Id: I89c65b418c6f71baf56d8cf7fd6b5098df649090
Reviewed-on: http://review.couchbase.org/43079
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Remove unused astyle flags

Change-Id: Idfcc32407fdff867675aecb02a67ed445e940572
Reviewed-on: http://review.couchbase.org/43360
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Build enterprise modules if present

Change-Id: I252138210bb119c023efa5e241759442def37082
Reviewed-on: http://review.couchbase.org/43361
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Rpath: Use correct seperator & 'ORIGIN' variable

Fix two bugs in the CouchbaseRpath script which prevent
libjemalloc.2.dylib in install/lib from being picked up on OS X:

1) CMAKE_INSTALL_RPATH should be a CMake list, and hence semicolon
   seperated.
   (Aside: while the RPATH is encoded in ELF files as a
   semicolon-seperated string, for Mach-O RPATH is encoded as number
   of LC_RPATH commands, and hence CMAKE needs to see it as a list to
   pass the correct options to the linker).

2) On OSX '@executable_path' should be used instead of '$ORIGIN' when
   specifying the runtime location of a binary.

Change-Id: Ia25b2dee4f0f8fdf67cf2182a2889971a8ad3916
Reviewed-on: http://review.couchbase.org/43194
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: buildbot <build@couchbase.com>
cbdeps: Update to jemalloc 5d9732f-cb2

Update to version with @rpath prepended to library name - see http://review.couchbase.org/#/c/43193/

Change-Id: Ieb021fac93e7986f73cc48e29d2bfa7acc4f09b0
Reviewed-on: http://review.couchbase.org/43195
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>
MB-12067: Use jemalloc as the preferred allocator on Linux/OS X

To facilitate using ep-engine's Defragmenter task, change the order of
prescidence of memory allocators so that jemalloc is preferred above
TCMalloc on Linux & OS X. Windows will continue to prefer TCMalloc.

Change-Id: Icaf678f04b28e5b1f54a60b1f711a226ebb95ef0
Reviewed-on: http://review.couchbase.org/43363
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Mark Woosey <mark.woosey@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
MB-12711: Make CMake pick up the right Erlang include path

There was a hack introduced for Debian. Though it seems that it was
a Debian bug. With a more recent version of Debian testing, it works
without the hack.

This commit is basically a revert of
565869a9c9929382cc41093c947544345e40e40e [1].

The problem with the hack was, that it tried to check for a header file
(erl_native_features_config.h) that only exists in Erlang >=17.0. When you
tried to compile Couchbase with a local Erlang <17.0, but had a system wide
installation of Erlang >=17.0, it would pick up the system wide installed
header files.

[1]: https://github.com/couchbase/tlm/commit/565869a9c9929382cc41093c947544345e40e40e

Change-Id: I5390b80404bd978cba807cf27d64ae143541de16
Reviewed-on: http://review.couchbase.org/43479
Tested-by: Volker Mische <volker.mische@gmail.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Move the enterprise extentions after static modules

The enterprise modules might want to reference modules
in the static modules, which will fail unless they're
defined before being referenced.

Change-Id: I11ef4f94d7a320307b47509f12e0de97076c6d76
Reviewed-on: http://review.couchbase.org/43548
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Keep MEMORY_ALLOCATOR as string instead of bool

As COUCHBASE_MEMORY_ALLOCATOR is a user-specified value it may be
empty (unless the user explicitly set it). Therefore to correctly
conditionalize other CMakefiles keep MEMORY_ALLOCATOR as a string (set
to the in-use allocator) instead of a bool.

Change-Id: Ifa17bf80c022da3d1354b513c690ab7da2b0df95
Reviewed-on: http://review.couchbase.org/43365
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
MB-12745: Check for usable jemalloc library

When using jemalloc as the memory allocator, we require a version
which has it's symbols prefixed (i.e. named je_malloc, je_free etc. as
opposed to malloc, free) as memcached needs to be able to interpose
it's own version of malloc et al which will in turn explictly call
je_XXX.

Therefore add a check to the CMake script to only set JEMALLOC_FOUND
if library of that configuration is found.

Change-Id: I6801e508efd607d4f8ba5283c95cfdf84683f63d
Reviewed-on: http://review.couchbase.org/43559
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: David Haikney <david@haikney.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>