Development

This section is about the development of new Ratatosk components.

Prerequisites

Ratatosk development requires access to either source code or development libraries, to request such access, contact Sintef Ocean.

You will also need recent versions of the following tools:

  • conan, which is a python-based package manager for C/C++ projects.
  • A functional C++ development environment, with a fairly recent compiler, gcc >= 8 or msvc++ >= 14.1.
  • CMake build system generator.
  • git version control system.

Add the sintef-public remote conan:

conan remote add sintef-public https://artifactory.smd.sintef.no/api/conan/conan-local
conan config set general.revisions_enabled=1

Building an existing codebase

The following assumes that the necessary access has been granted. To build e.g. the ratatoskcomponentsextra code base, perform the following steps:

Get source and dependencies

  1. Get the source code: ´git clone ssh://git@git.code.sintef.no/sfhlogging/ratatoskcomponentsextra.git´
  2. Create a build directory: mkdir build && cd build
  3. Install dependencies: conan install -u -s build_type=Release --build=missing ..

Compile the sources

Compile the sources by using either Conan, CMake or the underlying buildsystem:

Conan

conan build ..

This will run CMake under the hood, which again runs the underlying buildsystem (make, jinja, visual studio compiler...)

CMake

If CMake is run directly, the build command is separated in a configure command and a build command. Observe the differences between single-configuration buildsystems (typically Makefile on Linux) and multi-configuration buildsystems (typically Microsoft Visual Studio on Windows). See the examples below:

Single-configuration buildsystems:

cmake .. -D CMAKE_BUILD_TYPE=Debug
cmake --build .

Multi-configuration buildsystems:

cmake .. -Ax64
cmake --build . --config Debug

Underlying buildsystem

Please refer to the documentation for your buildsystem. Usually:

  1. Run the CMake configure step as shown above to configure the buildsystem.
  2. Run the native compile command, such as make or nmake.

Creating a new Ratatosk component library

The simplest is probably to copy the ratatoskcomponentsextra codebase and adapt this.