link_RocksDB.xcpjh
//////////////////// RocksDB //////////////////////
/*
Instructions for Windows
1) Download and install Git (e.g. Git-2.11.0-64-bit.exe) from
https://git-scm.com/download/win
2) Download and install CMake from https://cmake.org/download/
E.g. cmake-3.7.1-win64-x64.msi
Allow it to update the system path
3) Open command prompt and check that can run 'git' and 'cmake'
4) Download https://github.com/facebook/rocksdb
unzip rocksdb-master.zip to C:\developer\_root_\ThirdParty.Ceda\rocksdb-master
5) Note instructions in
C:\developer\_root_\ThirdParty.Ceda\rocksdb-master\CMakeLists.txt
[
1. Update paths to third-party libraries in thirdparty.inc file
(i.e. C:\developer\_root_\ThirdParty.Ceda\rocksdb-master\thirdparty.inc)
This by default has the following third party libraries all disabled :
set(USE_GFLAGS_DEFAULT 0) # GFLAGS is disabled by default, enable with -DGFLAGS=1 cmake command line agrument
set(USE_SNAPPY_DEFAULT 0) # SNAPPY is disabled by default, enable with -DSNAPPY=1 cmake command line agrument
set(USE_LZ4_DEFAULT 0) # LZ4 is disabled by default, enable with -DLZ4=1 cmake command line agrument
set(USE_ZLIB_DEFAULT 0) # ZLIB is disabled by default, enable with -DZLIB=1 cmake command line agrument
set(USE_XPRESS_DEFAULT 0) # XPRESS is disabled by default, enable with -DXPRESS=1 cmake command line agrument
set(USE_JEMALLOC_DEFAULT 0) # JEMALLOC is disabled by default, enable with -DJEMALLOC=1 cmake command line agrument
2. Create a new directory for build artifacts
mkdir build
cd build
3. Run cmake to generate project files for Windows, add more options to enable required third-party libraries.
See thirdparty.inc for more information.
sample command: cmake -G "Visual Studio 14 Win64" -DGFLAGS=1 -DSNAPPY=1 -DJEMALLOC=1 -DJNI=1 ..
4. Then build the project in debug mode (you may want to add /m[:<N>] flag to run msbuild in <N> parallel threads
or simply /m ot use all avail cores)
msbuild rocksdb.sln
rocksdb.sln build features exclusions of test only code in Release. If you build ALL_BUILD then everything
will be attempted but test only code does not build in Release mode.
5. And release mode (/m[:<N>] is also supported)
msbuild rocksdb.sln /p:Configuration=Release
]
6) Start the Developer Command Prompt window that is a part of Visual Studio installation
(i.e. under the start menu)
cd C:\developer\_root_\ThirdParty.Ceda\rocksdb-master
cmake -G "Visual Studio 14 Win64"
msbuild rocksdb.sln /p:Configuration=Release
*/
@if (IsWindowsPlatform)
{
$ROCKS_DB = "C:/developer/_root_/ThirdParty.Ceda/rocksdb-master"
+cpp
{
/I "$(ROCKS_DB)/include"
/D "CEDA_USING_ROCKS_DB"
}
+link("Win32")
{
}
+link("x64")
{
"$(ROCKS_DB)/Release/rocksdblib.lib"
"rpcrt4.lib"
}
}