diff --git a/10_presets/README.md b/10_presets/README.md index 0a9bbeb49433f0c10037515ed4e2b1c0545457f5..4cf1bd1b708b9ebe4f08cad0375889034c48fedc 100644 --- a/10_presets/README.md +++ b/10_presets/README.md @@ -11,12 +11,12 @@ Presets are based on two main files. Presets have a name and specify flags for the configure, build, test, install, etc stage. To invoke a preset configuration during the configure stage use e.g. -` -cmake --preset <ConfigurePreset> -S <SourceDirectory> -B <BuildDirectory> -` +`cmake --preset <ConfigurePreset> -S <SourceDirectory> -B <BuildDirectory>` or during the build stage use -` -cmake --preset <BuildPreset> --build <BuildDirectory> -` -How this minimal example is used in a CMake workflow is shown in [.gitlab-ci.yml](../.gitlab-ci.yml) -Many further details can be found in the CMake documentation for presets [](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) \ No newline at end of file +`cmake --preset <BuildPreset> --build <BuildDirectory>`. + +## Example +This recipe contains two configure presets as an example. The development preset can be selected like this, +`cmake --preset dev -S <SourceDirectory> -B <BuildDirectory>`. It uses `g++` as a compiler and enables compiler warnings. +If you build you will see a warning printed. In contrast, the `production` preset does not enable compiler warnings, +but optimization flags. A build with this configuration does not show warnings. \ No newline at end of file