Skip to content

Commit

Permalink
Add cmake presets (#435)
Browse files Browse the repository at this point in the history
* Add cmake presets

* FIx typo


Co-authored-by: Gerasimos Chourdakis <[email protected]>
  • Loading branch information
fsimonis and MakisH authored Aug 22, 2024
1 parent 7547f0d commit 606fa64
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pages/docs/installation/installation-source-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ 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`.
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:

```bash
cd precice-{{ site.precice_version }} # Enter the preCICE source directory
cmake --list-presets
```

Then, 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, if it does not already exist.

## Build directory

CMake keeps track of the source and the build directory separately.
Expand Down

0 comments on commit 606fa64

Please sign in to comment.