This tutorial explains how to build ORE on Posix systems such as MacOS and Linux. The commands listed here were tested on Ubuntu and you will likely have to modify the commands slightly on other systems.
This build requires:
- gcc
- Boost
- CMake
You need to grab the source code for ORE, e.g:
git clone --recurse-submodules https://github.com/OpenSourceRisk/Engine.git ore
For purposes of this tutorial, create environment variable
ORE_ROOT_DIR
pointing to the root directory of your build, e.g:
ORE_ROOT_DIR=/home/repos/ore
If you installed boost from packages (e.g. sudo apt install libboost-all-dev
), then your build will probably find boost automatically. If
you built boost yourself from source, then export some environment variables
pointing to the boost include and lib directories, e.g:
export BOOST_INCLUDEDIR=/home/repos/boost/install/include
export BOOST_LIBRARYDIR=/home/repos/boost/install/lib
Below are the commands to configure the ORE build using cmake:
mkdir $ORE_ROOT_DIR/build
cd $ORE_ROOT_DIR/build
cmake ..
Below are the commands to build ORE.
cd $ORE_ROOT_DIR/build
cmake --build .
cd to the test directory:
cd $ORE_ROOT_DIR/build/QuantLib/test-suite
Run all unit tests:
./quantlib-test-suite
Run a selected test, e.g:
./quantlib-test-suite --log_level=all --run_test="QuantLib test suite/Swap tests"
cd $ORE_ROOT_DIR/build/QuantExt/test
./quantext-test-suite
cd $ORE_ROOT_DIR/build/OREData/test
./ored-test-suite
cd $ORE_ROOT_DIR/build/OREAnalytics/test
./orea-test-suite