Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 3.32 KB

BUILDING.md

File metadata and controls

76 lines (53 loc) · 3.32 KB

Shell commands in this document are given in PowerShell

Dependencies

CMake

You will need to download and install CMake. Please double-check the minimum CMake version in the root CMakeLists.txt file of this project. The version should be right at the top:

cmake_minimum_required (VERSION 3.19)

Perl

You will need Perl for Windows for running code generation scripts. We tested building ESE with Strawberry Perl installed.

You will need Perl to be in your path, e.g.:

$env:Path += ";C:\Strawberry\perl\bin\"

Depending on your setup, you may need to unset the PERL5LIB environment variable, e.g.:

Remove-Item Env:\PERL5LIB

Message Compiler: Windows SDK

The Message Compiler (mc.exe) is included in the Windows SDK.

You will need the Windows SDK to be in your path, e.g.:

$env:Path += ";C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64"

CMake Generator Kit: Visual Studio

We tested the following kits:

  • Visual Studio Enterprise 2019 Release - amd64
  • Visual Studio Build Tools 2017 Release - amd64

Please see the Visual Studio Generators article on cmake.org for more.

CMake CLI

Once you have the dependencies installed, you can use CMake to build ESE on the command line. Note that, to prevent the CMake-generated files from appearing throughout the source tree, we build "out-of-source" by telling CMake to use the ./build/ directory.

Configure

You will first need to configure the project. The exact arguments will depend on your CMake generator. Assuming your clone of ESE is in c:\Extensible-Storage-Engine and you're using the Visual Studio Enterprise 2019 Release - amd64 kit, here's an example command:

cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Hc:/Extensible-Storage-Engine -Bc:/Extensible-Storage-Engine/build -G "Visual Studio 16 2019" -T host=x64 -A x64

Build

Build just the BstfUnitTest static library target:

cmake --build c:/Extensible-Storage-Engine/build --config Debug --target BstfUnitTest -- /maxcpucount:10

Build just the BookStoreSample binary and all of its dependencies:

cmake --build c:/Extensible-Storage-Engine/build --config Debug --target BookStoreSample -- /maxcpucount:10

Build everything:

cmake --build c:/Extensible-Storage-Engine/build --config Debug --target ALL_BUILD -- /maxcpucount:10

Visual Studio Code

If you would like to use Visual Studio Code to build ESE, here's a list of helpful extensions:

  • CMake Tools - for building using CMake from within Visual Studio Code
  • CMake language support - for editing of CMake files (autocomplete, documentation, syntax highlighting, etc.)
  • C/C++ - you will get language services (go-to-definition, etc.) once you build the code with CMake