diff --git a/docs/advanced_documentation/build-guide.md b/docs/advanced_documentation/build-guide.md index a84ae5308b..b4d0958d3c 100644 --- a/docs/advanced_documentation/build-guide.md +++ b/docs/advanced_documentation/build-guide.md @@ -126,10 +126,29 @@ You can specifiy a standard [CMAKE_BUILD_TYPE](https://cmake.org/cmake/help/late This will only build the core C-API dynamic library. ```shell -cmake -DCMAKE_BUILD_TYPE=Release -B build -cmake --build build --config Release +cmake -DCMAKE_BUILD_TYPE=Release -B build/ +cmake --build build/ --config Release ``` +You can further install the C-API dynamic library in the default `CMAKE_INSTALL_PREFIX` or a local directory. +The command below installs the C-API dynamic library in a local directory `install`. + +```shell +cmake --install build/ --config Release --prefix install/ +``` + +In the repository there is a package test that consumes the C-API dynamic library. +We can configure, build, install, and run the package test. + +```shell +cd tests/package_tests +cmake -DCMAKE_BUILD_TYPE=Release -Dpower_grid_model_DIR="../../install/lib/cmake/power_grid_model/" -B build/ +cmake --build build/ --config Release +cmake --install build/ --config Release --prefix install/ +./install/bin/power_grid_model_package_test +``` + + ### Developer build If you opt for a developer build of Power Grid Model,