ctest_build: add PRESET option

Allow users to specify a build preset when using CTest dashboard scripts.

Issue: #27630
This commit is contained in:
Zack Galbreath
2026-04-27 14:30:46 -04:00
committed by Brad King
parent de52c08ba2
commit 348ff1938b
7 changed files with 137 additions and 20 deletions

View File

@@ -15,6 +15,7 @@ Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`.
[NUMBER_WARNINGS <num-warn-var>]
[RETURN_VALUE <result-var>]
[CAPTURE_CMAKE_ERROR <result-var>]
[PRESET <preset>]
)
Build the project and store results in ``Build.xml``
@@ -75,6 +76,15 @@ The options are:
``NUMBER_WARNINGS <num-warn-var>``
Store the number of build warnings detected in the given variable.
``PRESET <preset>``
.. versionadded:: 4.4
Specify a :manual:`preset <cmake-presets(7)>` to use when building the
project. Any value set in the CTest script will take priority over a
corresponding setting from the preset. For example, the ``TARGET``
argument will override the :preset:`buildPresets.targets` setting from
the chosen preset.
``RETURN_VALUE <result-var>``
Store the return value of the native build tool in the given variable.