CMake presets
Make use of CMake presets. Using this requires CMake 3.19.
Build configuration presets are defined in CMakePresets.json
Usage:
# In OGS source code directory
cmake -S . --preset release
This will create a configured build in ogs/build/release
with the Ninja
generator and some predefined options.
Developer can create a CMakeUserPresets.json
file in the root source
directory with their own presets (this file is ignored by git).
-
Feature description was added to the changelog -
Tests covering your feature were added? -
Any new feature or behavior change was documented?
Things to discuss:
-
Shall the build be in-source ( ogs/build/[config-name]
)or not (?ogs/../build-[config-name]
) -
Is the preset naming scheme good? [generator]-[release|debug]-[gui|petsc|...]
, seename
-field in CMakePresets.json. -
Are there any useful presets missing? -
Shall the top-level default CMake options in the default preset ( release
) also become the defaults in CMake in general? (OGS_BUILD_UTILS
andOGS_USE_PYTHON
)