Skip to content

Build

Before build, make sure that dependencies are installed (see here for more informations).

Environment settings

On CentOS enable devtoolset-9 and rh-git227:

scl enable devtoolset-9 bash
source /opt/rh/rh-git227/enable

Update git submodule

git submodule update --init src/antares-deps

Configure build with CMake

Note :

cpack NSIS installer creation need an 'out of source build'. The build directory must be outside [antares_src] directory

cmake -B _build -S [antares_src] -DVCPKG_ROOT=[vcpkg_root] -DVCPKG_TARGET_TRIPLET=[vcpkg-triplet] -DCMAKE_BUILD_TYPE=release
cmake3 -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release
cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release

Here is a list of available CMake configure option :

Option Description
CMAKE_BUILD_TYPE Define build type. Available values are Release and Debug
BUILD_UI Enable or disable Antares Simulator UI compilation (default ON)
BUILD_ALL Enable build of ALL external libraries (default OFF)
DEPS_INSTALL_DIR Define dependencies libraries install directory
USE_PRECOMPILED_EXT This option must be set if you use wxWidget as precompiled external library (default OFF)
BUILD_TESTING Enable test build (default OFF)
BUILD_ORTOOLS Enable build for OR-Tools and its dependencies (requires an Internet connecton)

Additional options for windows

Option Description
VCPKG_ROOT Define vcpkg directory
VCPKG_TARGET_TRIPLET Define [vcpkg-triplet]

Build

cmake --build _build --config release -j8
cmake3 --build _build --config release -j8
cmake --build _build --config release -j8

Note :

Compilation can be done on several processors with -j option.

The final GUI file can be executed at _build/ui/simulator/antares-8.7-ui-simulator