-
Notifications
You must be signed in to change notification settings - Fork 39
Building and Installing from Source
To build from source, you need one of the supported operating systems (Linux, Windows, MacOS) and CMake (minimum version 3.16). On Linux and MacOS you need the GNU C/C++ toolchain (On MacOS, you may also use CMake to generate an XCode project), on Windows a set of MS Build Tools for Visual Studio 2017 or 2019.
- In the root of the ncbi-vdb checkout, run:
./configure
Use ./configure -h
for the list of available optins
- Once the configuration script has successfully finished, run:
make
This will invoke a Makefile that performs the following sequence:
- retrieve all the settings saved by the configuration script
- pass the settings to CMake
- if this is the first time CMake is invoked, it will generate a project tree. The project tree will be located underneath the directory specified in the
--build-prefix
option of the configuration. The location can be displayed by runningmake config
ormake help
inside the source tree. - build the CMake-generated project
- if this is the first time CMake is invoked, it will generate a project tree. The project tree will be located underneath the directory specified in the
Running make
from any directory inside the source tree will invoke the same sequence but limit the scope of the build to the sub-tree with the current directory as the root.
The make
command inside the source tree supports several additional targets; run make help
for the list and short descriptions.
To generate an XCode project, check out ncbi-vdb and run the standard CMake out-of-source build. For that, run CMake GUI, point it at the checkout directory and choose Xcode as the generator. Once the CMake generation succeeds, there will be an XCode project file ncbi-vdb.xcodeproj
in the build's binary directory. You can open it with XCode and build from the IDE.
Alternatively, you can configure and build from the command line:
cmake <path-to-ncbi-vdb> -G Xcode
cmake --build . --config Debug # or Release
To generate an MS Visual Studio solution, check out ncbi-vdb and run the standard CMake out-of-source build. For that, run CMake GUI, point it at the checkout directory, choose one of the supported Visual Studio generators (see NOTE below) and a 64-bit generator, and click on "Configure" and then "Generate". Once the CMake generation succeeds, there will be an MS VS solution file ncbi-vdb.sln
in the current directory. You can open it with the Visual Studio and build from the IDE.
NOTE: This release supports generators Visual Studio 15 2017
and Visual Studio 16 2019
, only for 64 bit platforms.
Alternatively, you can configure and build from the command line (assuming the correct MSVS Build Tools are in the %PATH%), e.g.:
cmake <path-to-ncbi-vdb> -G "Visual Studio 16 2019" -A x64
cmake --build . --config Debug # or Release