How to Build in the Repository

How to Build in the Repository#

Dependencies#

A development environment including dependencies can be created using Devcontainer of VSCode.

To build this repository, you will require following dependencies:

  • Python 3.12

    • You may want to use pyenv.

  • poetry

    • Required Python packages can be installed using poetry. Execute the command poetry install on this directory.

    • pre-commit will be installed via poetry, and used for some checks. Execute poetry run pre-commit install on this directory if you develop this library.

  • CMake

  • C++ 20 Compiler

    • Following compilers are tested in CI:

      • GCC 13

      • Clang 19

      • MSVC 19

Additionally, you will require following dependencies to build documentation.

  • Doxygen

  • Graphviz

  • PlantUML

    • Set PLANTUML_JAR_PATH environment variable to specify the place of plantuml.jar file.

  • Java runtime environment (JRE) for PlantUML.

Build commands#

After installation of dependencies, execute the following commands to build:

  1. Start a shell of poetry.

    cd <this-directory>
    poetry install
    poetry shell
    
  2. Download vcpkg if you haven’t already.

    git submodule update --init
    
  3. Build vcpkg.

    • On Windows:

      .\vcpkg\bootstrap-vcpkg.bat
      
    • On Linux:

      ./vcpkg/bootstrap-vcpkg.sh
      
  4. Configure.

    mkdir build
    cd build
    cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake
    
  5. Optionally edit options.

    <some-editor> CMakeCache.txt
    
  6. Build.

    cmake --build .
    
  7. Optionally run tests.

    ctest