Repo of the OpenVic-Simulation Library for OpenVic
For detailed instructions, view the OpenVic Contributor Quickstart Guide here
- Run the command
git submodule update --initto retrieve the first-party submodules (openvic-dataloader, lexy-vdf). Third-party dependencies are fetched automatically by CMake. - Pick a configure preset from
CMakePresets.json(windows-x64-md,windows-x64-mt,linux-x64,macos-universal) and runcmake --preset <preset>in the project root. - Run
cmake --build --preset <preset>-debug(or<preset>-release). The static library, headless executable, and unit tests land inout/build/<preset>/bin/<Config>/. - Run the tests with
ctest --preset <preset>-debug.
The headless executable and tests are built by default in standalone builds; disable with -DOPENVIC_SIM_BUILD_HEADLESS=OFF / -DOPENVIC_SIM_BUILD_TESTS=OFF. Benchmarks are opt-in: -DOPENVIC_SIM_BUILD_BENCHMARKS=ON.
Use CMake: add_subdirectory(openvic-simulation) and link against openvic::simulation.