From 013ad67db1c8951e4a97ac7fe4ace87dbbe869ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Fri, 26 Jul 2024 11:12:28 +0200 Subject: [PATCH 1/4] Add cmake presets --- .../installation-source-configuration.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pages/docs/installation/installation-source-configuration.md b/pages/docs/installation/installation-source-configuration.md index 90abf9d5c4..3a6240e485 100644 --- a/pages/docs/installation/installation-source-configuration.md +++ b/pages/docs/installation/installation-source-configuration.md @@ -7,6 +7,26 @@ keywords: configuration, basics, cmake, installation, building, source preCICE uses [CMake](https://cmake.org/) to configure and build the library. After this step, preCICE is ready to [be built](installation-source-building). +## Using presets + +preCICE offers a range of CMake configuration presets, which all use the build directory `build`. + +To see all available presets use: + +```bash +cd precice-{{ site.precice_version }} # Enter the preCICE source directory +cmake --list-presets +``` + +The to configure preCICE, run: + +```bash +cd precice-{{ site.precice_version }} # Enter the preCICE source directory +cmake --preset=production # Configure using the production preset +``` + +This will automatically create a build directory for you. + ## Build directory CMake keeps track of the source and the build directory separately. From af8a26df1e0c71e7990ad6bf7e28d3670269b632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Thu, 22 Aug 2024 14:57:59 +0200 Subject: [PATCH 2/4] FIx typo Co-authored-by: Gerasimos Chourdakis --- pages/docs/installation/installation-source-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/docs/installation/installation-source-configuration.md b/pages/docs/installation/installation-source-configuration.md index 3a6240e485..bdf83e7319 100644 --- a/pages/docs/installation/installation-source-configuration.md +++ b/pages/docs/installation/installation-source-configuration.md @@ -18,7 +18,7 @@ cd precice-{{ site.precice_version }} # Enter the preCICE source directory cmake --list-presets ``` -The to configure preCICE, run: +Then, to configure preCICE, run: ```bash cd precice-{{ site.precice_version }} # Enter the preCICE source directory From 0381fef62b1e81d127dcbb9656d113a9fad5b54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Thu, 22 Aug 2024 14:58:16 +0200 Subject: [PATCH 3/4] Reword directory Co-authored-by: Gerasimos Chourdakis --- pages/docs/installation/installation-source-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/docs/installation/installation-source-configuration.md b/pages/docs/installation/installation-source-configuration.md index bdf83e7319..75c00c2553 100644 --- a/pages/docs/installation/installation-source-configuration.md +++ b/pages/docs/installation/installation-source-configuration.md @@ -25,7 +25,7 @@ cd precice-{{ site.precice_version }} # Enter the preCICE source directory cmake --preset=production # Configure using the production preset ``` -This will automatically create a build directory for you. +This will automatically create a `build/` directory for you, if it does not already exist. ## Build directory From e9b17793b267dabd31feec2df2e42d9b9ee0004b Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Thu, 22 Aug 2024 16:09:34 +0200 Subject: [PATCH 4/4] Update pages/docs/installation/installation-source-configuration.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Frédéric Simonis --- pages/docs/installation/installation-source-configuration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/docs/installation/installation-source-configuration.md b/pages/docs/installation/installation-source-configuration.md index 75c00c2553..0124f22f56 100644 --- a/pages/docs/installation/installation-source-configuration.md +++ b/pages/docs/installation/installation-source-configuration.md @@ -10,6 +10,8 @@ After this step, preCICE is ready to [be built](installation-source-building). ## Using presets preCICE offers a range of CMake configuration presets, which all use the build directory `build`. +These presets adjust flags, build type, link-time optimizations, assertions, and more. +You can combine presets with other CMake arguments such as `-DCMAKE_INSTALL_PREFIX=...`. To see all available presets use: