Skip to content

Documentation: Describe how to use CMakePresets with custom CMake arguments #583

@ADKaster

Description

@ADKaster

When building for multiple branches at once, developers might want to have several parallel build directories.

This can be accomplished by invoking cmake directly. The CMakePresets.json provides a template for each build type, but developers can pass custom cmake flags to each invocation as well.

cmake --preset Debug -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 -B Build/some-feature -DENABLE_QT=ON
cmake --build Build/some-feature

For example.

Explain this in the build documentation and provide examples for how --preset interacts with custom build flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions