Skip to content

Commit

Permalink
Merge pull request #737 from PowerGridModel/fix/build-guide-user-build
Browse files Browse the repository at this point in the history
improve user build guide
  • Loading branch information
TonyXiang8787 authored Sep 26, 2024
2 parents 850ef79 + 79e33e4 commit 2f0f310
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions docs/advanced_documentation/build-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2f0f310

Please sign in to comment.