From 2db682e5717fe8b85e94b146f85580a9e294d4fb Mon Sep 17 00:00:00 2001 From: Tony Xiang Date: Wed, 25 Sep 2024 15:11:29 +0200 Subject: [PATCH 1/3] improve user build guide Signed-off-by: Tony Xiang --- docs/advanced_documentation/build-guide.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/advanced_documentation/build-guide.md b/docs/advanced_documentation/build-guide.md index a84ae5308b..b986b21d2a 100644 --- a/docs/advanced_documentation/build-guide.md +++ b/docs/advanced_documentation/build-guide.md @@ -130,6 +130,24 @@ 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 which consumes the C-API dynamic library. +We can configure, build, 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 +./build/power_grid_model_package_test +``` + + ### Developer build If you opt for a developer build of Power Grid Model, From 0c8559e75e93419dfab8ac6f4d2b83c3ddaa07e5 Mon Sep 17 00:00:00 2001 From: Tony Xiang Date: Wed, 25 Sep 2024 15:29:10 +0200 Subject: [PATCH 2/3] use install to include dll Signed-off-by: Tony Xiang --- docs/advanced_documentation/build-guide.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/advanced_documentation/build-guide.md b/docs/advanced_documentation/build-guide.md index b986b21d2a..2f8e35fc01 100644 --- a/docs/advanced_documentation/build-guide.md +++ b/docs/advanced_documentation/build-guide.md @@ -138,13 +138,14 @@ cmake --install build --config Release --prefix install ``` In the repository there is a package test which consumes the C-API dynamic library. -We can configure, build, and run the package test. +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 -./build/power_grid_model_package_test +cmake --install build --config Release --prefix install +./install/bin/power_grid_model_package_test ``` From 79e33e428a5623862ff1ca78442115a5ae2aa1b1 Mon Sep 17 00:00:00 2001 From: Tony Xiang Date: Wed, 25 Sep 2024 15:39:24 +0200 Subject: [PATCH 3/3] resolved comments Signed-off-by: Tony Xiang --- docs/advanced_documentation/build-guide.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/advanced_documentation/build-guide.md b/docs/advanced_documentation/build-guide.md index 2f8e35fc01..b4d0958d3c 100644 --- a/docs/advanced_documentation/build-guide.md +++ b/docs/advanced_documentation/build-guide.md @@ -126,25 +126,25 @@ 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 +cmake --install build/ --config Release --prefix install/ ``` -In the repository there is a package test which consumes the C-API dynamic library. +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 +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 ```