About vcpkg ports

vcpkg ports define packages/libraries that can be used with vcpkg.

They serve both vcpkg modes:

  • vcpkg manifest mode: this repository can then be used as a (Git) vcpkg registry. This is the recommended way of consuming custom ports from external registries. See the in-depth guide available at TODO.

  • vcpkg classic mode: via the --overlay-ports=./ports flag from the command-line. See the guide available at TODO.

vcpkg utilizes CMake to configure, build and link C++ code in either a local isolated project-specific environment or in a more global way across the whole system.

vcpkg downloads source code (or binaries if available) in order to compile on the host platform using the available compilation toolchain to produce libraries that can later be consumed by users. This ensures reproducible builds across multiple platforms and allows for controlled per-project development environments.

Project-Rat C++ libraries depends on multiple libraries listed in Rat-Docs. Most of these dependencies are provided in the default vcpkg registry as ports, such as:

  • Boost

  • SuiteSparse

  • SUNDIALS

  • JsonCpp

  • TCLAP

but some might require some tweaking in order to work properly. This can be related to specific compilation (e.g. OpenBLAS and single threading) or the lack of recent versions in the vcpkg default registry (e.g. Armadillo version 15.2.x).

Note

The base installation sequence for compiling Rat on Windows in Rat-Docs seems to use the vcpkg default OpenBLAS port, but I did not have such success when trying it on my part, so Rat-vcpkg ships its own port.

Rat-vcpkg solves this by providing its own overrides for such ports, as well as Rat-specific ports to compile Rat C++ libraries using all previously mentionned ports.

Ports definitions can be found under the rat-vcpkg/ports, directory, each following the structure of typical vcpkg ports.

Rat-vcpkg ports

When building Rat-vcpkg ports in either modes vcpkg solves the dependencies listed in the ports definitions and start compiling these first. This is why installing rat-models starts the whole dependency chain and installs everything needed.

It might however be easiest to install each library step by step for debugging purposes following the order below:

  1. openblas - modified base OpenBLAS for single-threading

  2. armadillo

  3. rat-common

  4. distmesh-cpp

  5. materials-cpp

  6. rat-math

  7. rat-mlfmm

  8. rat-nl - optional

  9. rat-models - longest to build

Note

rat-nl is only required for the non-linear solver used in rat-models thus it is defined as a feature. It is enabled by default.

If not required: rat-models[-nl]:x64-windows-release.