summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/docs/build-windows.dox
blob: 759ccfa32d3991ad0d834ee26f962e291763fb93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*! @page build-windows Building and installing WiredTiger on Windows

@section windows_github Building using Git and GitHub

Skip this step if you are building from a WiredTiger release package,
and proceed with @ref windows_building

First, clone the repository:

@code
git clone git://github.com/wiredtiger/wiredtiger.git
@endcode

Now proceed with @ref windows_building

@section windows_building Building on Windows

Building WiredTiger on Windows requires
<a href="https://cmake.org/">CMake</a> as well as the Microsoft Visual
C++ compiler in Microsoft Visual Studio 2017.

You can build WiredTiger from source using command-line tools.
When compiling via command-line tools, we recommend a prompt/shell that has been appropriately
configured with VS toolchain environment variables. We usually recommend using the
<a href="https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell">Visual Studio Developer Command Prompt/Powershell</a> to
ensure an appropriately configured environment.

Change directory to the top-level directory, then create and configure a new directory to run your
build from:

@code
cd wiredtiger
mkdir build
cd build
@endcode

Change into your newly created build directory and using CMake run the build configuration
step to generate your build.

@code
cmake ..\.
@endcode

In the absence of an explicit generator, CMake will generate Visual Studio project files
(\c .vcxproj), representing build targets within WiredTiger. To compile the entire
WiredTiger project, in the same directory we configured the build, run \c msbuild:
@code
msbuild ALL_BUILD.vcxproj
@endcode

To build the python language support, a 64-bit version of Python is
required.  The required version is referred to as x86-64 on
<a href="www.python.org">Python.org</a> or x64 on
<a href="http://www.activestate.com/activepython/downloads">
ActiveState Python</a>.

@section windows_installing Installing WiredTiger

The WiredTiger software consists of a library and a single standalone
utility.

WiredTiger's distribution follows the GNU Coding Standards installation
guidelines, and by default WiredTiger builds and installs a static library
and dll version of the library.

@code
file <root directory>/bin/
wt.exe:			x64 standalone executable

file <root directory>/lib/
libwiredtiger.lib:	x64 static library
wiredtiger.lib:		x64 import library for dll
@endcode

To install WiredTiger:

@code
msbuild INSTALL.vcxproj
@endcode

To install WiredTiger's libraries or binaries into alternate locations,
you can use the \c -DCMAKE_INSTALL_PREFIX configuration option.

@code
cmake -DCMAKE_INSTALL_PREFIX=c:\wiredtiger
@endcode

@section windows_configure Configuring WiredTiger

The WiredTiger software supports some additional configuration options:

@par \c -DHAVE_ATTACH=1
Configure WiredTiger to sleep and wait for a debugger to attach on failure.
<b>DO NOT</b> configure this option in production environments.

@par \c -DHAVE_DIAGNOSTIC=1
Configure WiredTiger to perform various run-time diagnostic tests.
<b>DO NOT</b> configure this option in production environments.

@par \c -DENABLE_LZ4=1
Configure WiredTiger for <a href="https://github.com/Cyan4973/lz4">LZ4</a>
compression; see @ref compression for more information.

@par \c -DENABLE_PYTHON=1
Build the WiredTiger <a href="http://www.python.org">Python</a> API;
requires <a href="http://swig.org">SWIG</a>.

@par \c -DENABLE_SNAPPY=1
Configure WiredTiger for <a href="http://code.google.com/p/snappy/">snappy</a>
compression; see @ref compression for more information.

@par \c -DENABLE_ZLIB=1
Configure WiredTiger for <a href="http://www.zlib.net/">zlib</a>
compression; see @ref compression for more information.

@par \c -DENABLE_ZSTD=1
Configure WiredTiger for <a href="https://github.com/facebook/zstd">Zstd</a>
compression; see @ref compression for more information.

@par \c -DWT_STANDALONE_BUILD=0
Configure WiredTiger to disable standalone build. Standalone build is enabled
by default.

@section windows_ctest Running WiredTiger C/C++ Tests

The WiredTiger CMake build makes available a suite of C/C++ based tests.
To run the available tests you can use our smoke test alias (\c check). Ensure you're in the build directory and execute:

@code
ctest -C <Debug|Release> -L check
@endcode

Alternatively to just run all the tests available:

@code
ctest -C <Debug|Release>
@endcode

In addition, to get verbose output with your test run you can use the \c -VV flag:

@code
ctest -C <Debug|Release> -VV
@endcode

If you want to focus on running a specific test (i.e. run a test that may be failing) you can use the \c -R flag:

@code
# Note: -R specifies a regex, where any matching test will be run
ctest -C <Debug|Release> -R test_name
@endcode

 */