Those are the minimal version that have been tested to work, but Sirius should also work with more recent versions of those tools.
- gcc 6.3 or Visual Studio 15 2017
- cmake 3.12
- git 1.8
First, clone the project:
git clone https://github.com/rte-france/sirius-solver.git -b master Sirius
Then you can configure it with cmake:
cd Sirius
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="SiriusInstall" -B build -S src
And finally build and install:
cmake --build build/ --config Release --target install
A directory named SiriusInstall will be created, containing the Sirius solver library to be used with cmake projects.
First, locate your Sirius install directory (generated with the above process, or downloaded from your nexus). It must contains the cmake, lib and include directories.
This directory will be refered to as sirius_solver_ROOT from now on.
There are two ways of doing so.
- You can define an environnement variable named sirius_solver_ROOT pointing to your Sirius install directory.
- Or you can define a sirius_solver_ROOT variable while calling cmake
cmake -Dsirius_solver_ROOT="/path/to/sirius_solver_ROOT" [the rest of your cmake configuration command] ...
First, you need to activate the following cmake policy. It will allow cmake to find everything it needs to use the Sirius library from the sirius_solver_ROOT path.
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
You can then just import the sirius_solver package.
find_package(sirius_solver CONFIG REQUIRED)
Then, you can link you target (binary, library, ...) with sirius_solver.
target_link_libraries(${EXECUTABLE_NAME} PUBLIC sirius_solver)
Please refer to the Sirius solver API user guide.