.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CMAKE-PRESETS" "7" "Jul 09, 2026" "4.4.0" "CMake" .SH NAME cmake-presets \- CMake Presets Reference .SH INTRODUCTION .sp Added in version 3.19. .sp One problem that CMake users often face is sharing settings with other people for common ways to configure a project. This may be done to support CI builds, or for users who frequently use the same build. CMake supports two main files, \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP, that allow users to specify common configure options and share them with others. .sp Added in presets version 4: CMake also supports files included with the \fBinclude\fP field. See Includes for more details. .sp \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP live in the project\(aqs root directory. They both have exactly the same format, and both are optional (though at least one must be present if \fB\-\-preset\fP \%<#\:cmdoption-cmake-preset> is specified). \fBCMakePresets.json\fP is meant to specify project\-wide build details, while \fBCMakeUserPresets.json\fP is meant for developers to specify their own local build details. .sp \fBCMakePresets.json\fP may be checked into a version control system, and \fBCMakeUserPresets.json\fP should NOT be checked in. For example, if a project is using Git, \fBCMakePresets.json\fP may be tracked, and \fBCMakeUserPresets.json\fP should be added to the \fB\&.gitignore\fP\&. .sp Added in version 4.4: CMake also supports specifying a file from which to read presets via the \fB\-\-presets\-file\fP \%<#\:cmdoption-cmake-presets-file> option. If this option is specified, neither of \fBCMakePresets.json\fP nor \fBCMakeUserPresets.json\fP are required to be present, and any presets defined in those files will be ignored/unavailable. .SH FORMAT .sp The files are a JSON document with an object as the root: .INDENT 0.0 .INDENT 3.5 .sp .EX { \(dqversion\(dq: 10, \(dqcmakeMinimumRequired\(dq: { \(dqmajor\(dq: 3, \(dqminor\(dq: 23, \(dqpatch\(dq: 0 }, \(dq$comment\(dq: \(dqAn example CMakePresets.json file\(dq, \(dqinclude\(dq: [ \(dqotherThings.json\(dq, \(dqmoreThings.json\(dq ], \(dqconfigurePresets\(dq: [ { \(dq$comment\(dq: [ \(dqThis is a comment row.\(dq, \(dqThis is another comment,\(dq, \(dqjust because we can do it\(dq ], \(dqname\(dq: \(dqdefault\(dq, \(dqdisplayName\(dq: \(dqDefault Config\(dq, \(dqdescription\(dq: \(dqDefault build using Ninja generator\(dq, \(dqgenerator\(dq: \(dqNinja\(dq, \(dqbinaryDir\(dq: \(dq${sourceDir}/build/default\(dq, \(dqcacheVariables\(dq: { \(dqFIRST_CACHE_VARIABLE\(dq: { \(dqtype\(dq: \(dqBOOL\(dq, \(dqvalue\(dq: \(dqOFF\(dq }, \(dqSECOND_CACHE_VARIABLE\(dq: \(dqON\(dq }, \(dqenvironment\(dq: { \(dqMY_ENVIRONMENT_VARIABLE\(dq: \(dqTest\(dq, \(dqPATH\(dq: \(dq$env{HOME}/ninja/bin:$penv{PATH}\(dq }, \(dqvendor\(dq: { \(dqexample.com/ExampleIDE/1.0\(dq: { \(dqautoFormat\(dq: true } } }, { \(dqname\(dq: \(dqninja\-multi\(dq, \(dqinherits\(dq: \(dqdefault\(dq, \(dqdisplayName\(dq: \(dqNinja Multi\-Config\(dq, \(dqdescription\(dq: \(dqDefault build using Ninja Multi\-Config generator\(dq, \(dqgenerator\(dq: \(dqNinja Multi\-Config\(dq }, { \(dqname\(dq: \(dqwindows\-only\(dq, \(dqinherits\(dq: \(dqdefault\(dq, \(dqdisplayName\(dq: \(dqWindows\-only configuration\(dq, \(dqdescription\(dq: \(dqThis build is only available on Windows\(dq, \(dqcondition\(dq: { \(dqtype\(dq: \(dqequals\(dq, \(dqlhs\(dq: \(dq${hostSystemName}\(dq, \(dqrhs\(dq: \(dqWindows\(dq } } ], \(dqbuildPresets\(dq: [ { \(dqname\(dq: \(dqdefault\(dq, \(dqconfigurePreset\(dq: \(dqdefault\(dq } ], \(dqtestPresets\(dq: [ { \(dqname\(dq: \(dqdefault\(dq, \(dqconfigurePreset\(dq: \(dqdefault\(dq, \(dqoutput\(dq: {\(dqoutputOnFailure\(dq: true}, \(dqexecution\(dq: {\(dqnoTestsAction\(dq: \(dqerror\(dq, \(dqstopOnFailure\(dq: true} } ], \(dqpackagePresets\(dq: [ { \(dqname\(dq: \(dqdefault\(dq, \(dqconfigurePreset\(dq: \(dqdefault\(dq, \(dqgenerators\(dq: [ \(dqTGZ\(dq ] } ], \(dqworkflowPresets\(dq: [ { \(dqname\(dq: \(dqdefault\(dq, \(dqsteps\(dq: [ { \(dqtype\(dq: \(dqconfigure\(dq, \(dqname\(dq: \(dqdefault\(dq }, { \(dqtype\(dq: \(dqbuild\(dq, \(dqname\(dq: \(dqdefault\(dq }, { \(dqtype\(dq: \(dqtest\(dq, \(dqname\(dq: \(dqdefault\(dq }, { \(dqtype\(dq: \(dqpackage\(dq, \(dqname\(dq: \(dqdefault\(dq } ] } ], \(dqvendor\(dq: { \(dqexample.com/ExampleIDE/1.0\(dq: { \(dqautoFormat\(dq: false } } } .EE .UNINDENT .UNINDENT .sp Added in presets version 10: Presets files may include comments using the key \fB$comment\fP at any level within the JSON object to provide documentation. .sp The root object recognizes the following fields: .INDENT 0.0 .TP .B \fB$schema\fP Added in presets version 8. .sp An optional string that provides a URI to the JSON schema that describes the structure of this JSON document. This field is used for validation and autocompletion in editors that support JSON schema. It doesn\(aqt affect the behavior of the document itself. If this field is not specified, the JSON document will still be valid, but tools that use JSON schema for validation and autocompletion may not function correctly. .UNINDENT .INDENT 0.0 .TP .B \fBversion\fP A required integer representing the version of the JSON schema. See Versions for discussion of the supported versions and the corresponding version of CMake in which they were added. .UNINDENT .INDENT 0.0 .TP .B \fBcmakeMinimumRequired\fP An optional object representing the minimum version of CMake needed to build this project. This object consists of the following fields: .INDENT 7.0 .TP .B \fBmajor\fP An optional integer representing the major version. .UNINDENT .INDENT 7.0 .TP .B \fBminor\fP An optional integer representing the minor version. .UNINDENT .INDENT 7.0 .TP .B \fBpatch\fP An optional integer representing the patch version. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBinclude\fP Added in presets version 4. .sp An optional array of strings representing files to include. If the filenames are not absolute, they are considered relative to the current file. See Includes for discussion of the constraints on included files. .UNINDENT .INDENT 0.0 .TP .B \fBvendor\fP An optional map containing vendor\-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, the keys should be a vendor\-specific domain name followed by a \fB/\fP\-separated path. For example, the Example IDE 1.0 could use \fBexample.com/ExampleIDE/1.0\fP\&. The value of each field can be anything desired by the vendor, though will typically be a map. .UNINDENT .INDENT 0.0 .TP .B \fBconfigurePresets\fP An optional array of Configure Preset objects. .UNINDENT .INDENT 0.0 .TP .B \fBbuildPresets\fP Added in presets version 2. .sp An optional array of Build Preset objects. .UNINDENT .INDENT 0.0 .TP .B \fBtestPresets\fP Added in presets version 2. .sp An optional array of Test Preset objects. .UNINDENT .INDENT 0.0 .TP .B \fBpackagePresets\fP Added in presets version 6. .sp An optional array of Package Preset objects. .UNINDENT .INDENT 0.0 .TP .B \fBworkflowPresets\fP Added in presets version 6. .sp An optional array of Workflow Preset objects. .UNINDENT .SS Includes .sp Added in presets version 4. .sp CMake presets files can include other files with the \fBinclude\fP field. Files included in this manner can also include other files. If \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP are both present, \fBCMakeUserPresets.json\fP implicitly includes \fBCMakePresets.json\fP, even with no \fBinclude\fP field, in all versions of the format. .sp If a presets file contains presets that inherit from presets in another file, the file must include the other file either directly or indirectly. Include cycles are not allowed among files. If \fBa.json\fP includes \fBb.json\fP, \fBb.json\fP cannot include \fBa.json\fP\&. However, a file may be included multiple times from the same file or from different files. .sp Files directly or indirectly included from \fBCMakePresets.json\fP should be guaranteed to be provided by the project. \fBCMakeUserPresets.json\fP may include files from anywhere. .sp Changed in presets version 7: The \fBinclude\fP field supports macro expansion, but only \fB$penv{}\fP macro expansion. .sp Changed in presets version 9: The \fBinclude\fP field supports macro expansion, except for \fB$env{}\fP and preset\-specific macros (i.e., those derived from the fields inside a preset\(aqs definition like \fBpresetName\fP). .SS Configure Preset .sp Each entry of the \fBconfigurePresets\fP array is a JSON object that may contain the following fields: .INDENT 0.0 .TP .B \fBname\fP A required string representing the machine\-friendly name of the preset. This identifier is used in the \fBcmake \-\-preset\fP \%<#\:cmdoption-cmake-preset> option. There must not be two configure presets in the union of \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP in the same directory with the same name. However, a configure preset may have the same name as a build, test, package, or workflow preset. .UNINDENT .INDENT 0.0 .TP .B \fBhidden\fP An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the \fB\-\-preset\fP \%<#\:cmdoption-cmake-preset> argument, will not show up in the \fBCMake GUI\fP \%<#\:manual:cmake-gui(1)>, and does not have to have a valid \fBgenerator\fP or \fBbinaryDir\fP, even from inheritance. \fBhidden\fP presets are intended to be used as a base for other presets to inherit via the \fBinherits\fP field. .UNINDENT .INDENT 0.0 .TP .B \fBinherits\fP An optional array of strings representing the names of presets from which to inherit. This field can also be a string, which is equivalent to an array containing one string. .sp The preset will inherit all of the fields from the \fBinherits\fP presets by default (except \fBname\fP, \fBhidden\fP, \fBinherits\fP, \fBdescription\fP, and \fBdisplayName\fP), but can override them as desired. If multiple \fBinherits\fP presets provide conflicting values for the same field, the earlier preset in the \fBinherits\fP array will be preferred. .sp A preset can only inherit from another preset that is defined in the same file or in one of the files it includes (directly or indirectly). Presets in \fBCMakePresets.json\fP may not inherit from presets in \fBCMakeUserPresets.json\fP\&. .UNINDENT .INDENT 0.0 .TP .B \fBcondition\fP Added in presets version 3. .sp An optional Condition object. .UNINDENT .INDENT 0.0 .TP .B \fBvendor\fP An optional map containing vendor\-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root\-level \fBvendor\fP field. If vendors use their own per\-preset \fBvendor\fP field, they should implement inheritance in a sensible manner when appropriate. .UNINDENT .INDENT 0.0 .TP .B \fBdisplayName\fP An optional string with a human\-friendly name of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBdescription\fP An optional string with a human\-friendly description of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBgenerator\fP An optional string representing the \fBgenerator\fP \%<#\:manual:cmake-generators(7)> to use for the preset. .sp Changed in presets version 3: If omitted, CMake will fall back to regular generator discovery procedure. In previous versions, if not specified, this field must be inherited from the \fBinherits\fP preset (unless this preset is \fBhidden\fP). .sp Note that for Visual Studio Generators \%<#\:visual-studio-generators>, unlike in the command line \fB\-G\fP \%<#\:cmdoption-cmake-G> argument, you cannot include the platform name in the generator name. Use the \fBarchitecture\fP field instead. .UNINDENT .INDENT 0.0 .TP .B \fBarchitecture\fP Optional field representing the platform for \fBgenerators\fP \%<#\:manual:cmake-generators(7)> that support it. .sp See \fBcmake \-A\fP \%<#\:cmdoption-cmake-A> for possible values. .sp \fBarchitecture\fP may be either a string or an object with the following fields: .INDENT 7.0 .TP .B \fBvalue\fP An optional string representing the value. .UNINDENT .INDENT 7.0 .TP .B \fBstrategy\fP An optional string telling CMake how to handle the field. Valid values are: .INDENT 7.0 .TP .B \fB\(dqset\(dq\fP Set the respective value. This will result in an error for generators that do not support the respective field. .TP .B \fB\(dqexternal\(dq\fP Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake. .UNINDENT .sp If no \fBstrategy\fP field is given, or if the field uses the string form rather than the object form, the behavior is the same as \fB\(dqset\(dq\fP\&. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBtoolset\fP Optional field representing the toolset for \fBgenerators\fP \%<#\:manual:cmake-generators(7)> that support it. .sp See \fBcmake \-T\fP \%<#\:cmdoption-cmake-T> for possible values. .sp \fBtoolset\fP may be either a string or an object with the following fields: .INDENT 7.0 .TP .B \fBvalue\fP An optional string representing the value. .UNINDENT .INDENT 7.0 .TP .B \fBstrategy\fP An optional string telling CMake how to handle the field. Valid values are: .INDENT 7.0 .TP .B \fB\(dqset\(dq\fP Set the respective value. This will result in an error for generators that do not support the respective field. .TP .B \fB\(dqexternal\(dq\fP Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake. .UNINDENT .sp If no \fBstrategy\fP field is given, or if the field uses the string form rather than the object form, the behavior is the same as \fB\(dqset\(dq\fP\&. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBtoolchainFile\fP Added in presets version 3. .sp An optional string representing the path to the toolchain file. This field supports macro expansion\&. If a relative path is specified, it is calculated relative to the build directory, and if not found, relative to the source directory. This field takes precedence over any \fBCMAKE_TOOLCHAIN_FILE\fP \%<#\:variable:CMAKE_TOOLCHAIN_FILE> value. .UNINDENT .INDENT 0.0 .TP .B \fBgraphviz\fP Added in presets version 10. .sp An optional string representing the path to the graphviz input file, that will contain all the library and executable dependencies in the project. See the documentation for \fBcmake \-\-graphviz\fP \%<#\:cmdoption-cmake-graphviz> for more details. .sp This field supports macro expansion\&. If a relative path is specified, it is calculated relative to the current working directory. .UNINDENT .INDENT 0.0 .TP .B \fBbinaryDir\fP An optional string representing the path to the output binary directory. This field supports macro expansion\&. If a relative path is specified, it is calculated relative to the source directory. .sp Changed in presets version 3: If omitted, CMake will calculate the path using regular methods. In previous versions, if not specified, this field must be inherited from the \fBinherits\fP preset (unless this preset is \fBhidden\fP). .UNINDENT .INDENT 0.0 .TP .B \fBinstallDir\fP Added in presets version 3. .sp An optional string representing the path to the installation directory, which will be used as the \fBCMAKE_INSTALL_PREFIX\fP \%<#\:variable:CMAKE_INSTALL_PREFIX> variable. This field supports macro expansion\&. If a relative path is specified, it is calculated relative to the source directory. .UNINDENT .INDENT 0.0 .TP .B \fBcmakeExecutable\fP An optional string representing the path to the CMake executable to use for this preset. This is reserved for use by IDEs, and is not used by CMake itself. IDEs that use this field should expand any macros in it. .UNINDENT .INDENT 0.0 .TP .B \fBcacheVariables\fP An optional map of cache variables. The key is the variable name (which may not be an empty string), and the value is either \fBnull\fP, a boolean (which is equivalent to a value of \fB\(dqTRUE\(dq\fP or \fB\(dqFALSE\(dq\fP and a type of \fBBOOL\fP), a string representing the value of the variable (which supports macro expansion), or an object with the following fields: .INDENT 7.0 .TP .B \fBtype\fP An optional string representing the type of the variable. .TP .B \fBvalue\fP A required string or boolean representing the value of the variable. A boolean is equivalent to \fB\(dqTRUE\(dq\fP or \fB\(dqFALSE\(dq\fP\&. This field supports macro expansion\&. .UNINDENT .sp Cache variables are inherited through the \fBinherits\fP field, and the preset\(aqs variables will be the union of its own \fBcacheVariables\fP and the \fBcacheVariables\fP from all its parents. If multiple presets in this union define the same variable, the standard rules of \fBinherits\fP are applied. Setting a variable to \fBnull\fP causes it to not be set, even if a value was inherited from another preset. .UNINDENT .INDENT 0.0 .TP .B \fBenvironment\fP An optional map of environment variables. The key is the variable name (which may not be an empty string), and the value is either \fBnull\fP or a string representing the value of the variable. Each variable is set regardless of whether or not a value was given to it by the process\(aqs environment. .sp This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example, if \fBENV_1\fP is \fB$env{ENV_2}\fP, \fBENV_2\fP may not be \fB$env{ENV_1}\fP). \fB$penv{NAME}\fP allows one to prepend or append values to existing environment variables by accessing only values from the parent environment. .sp Environment variables are inherited through the \fBinherits\fP field, and the preset\(aqs environment will be the union of its own \fBenvironment\fP and the \fBenvironment\fP from all its parents. If multiple presets in this union define the same variable, the standard rules of \fBinherits\fP are applied. Setting a variable to \fBnull\fP causes it to not be set, even if a value was inherited from another preset. .UNINDENT .INDENT 0.0 .TP .B \fBwarnings\fP An optional object specifying the warnings to enable. The object may contain the following fields: .INDENT 7.0 .TP .B \fBauthor\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Wauthor\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-author\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.author\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBdeprecated\fP An optional boolean. Equivalent to passing \fB\-Wdeprecated\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-deprecated\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.deprecated\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBdev\fP Removed in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Wdev\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-dev\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.dev\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBexperimental\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Wexperimental\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-experimental\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.experimental\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBinstallAbsoluteDestination\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Winstall\-absolute\-destination\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-install\-absolute\-destination\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.installAbsoluteDestination\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBpolicy\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Wpolicy\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-policy\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.policy\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBuninitialized\fP An optional boolean. Equivalent to passing \fB\-Wuninitialized\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-uninitialized\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.uninitialized\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBunusedCli\fP An optional boolean. Equivalent to passing \fB\-Wunused\-cli\fP \%<#\:cmdoption-cmake-W> or \fB\-Wno\-unused\-cli\fP \%<#\:cmdoption-cmake-Wno> on the command line. This may not be set to \fBfalse\fP if \fBerrors.unusedCli\fP is set to \fBtrue\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBsystemVars\fP An optional boolean. Setting this to \fBtrue\fP is equivalent to passing \fB\-\-check\-system\-vars\fP \%<#\:cmdoption-cmake-check-system-vars> on the command line. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBerrors\fP An optional object specifying the errors to enable. The object may contain the following fields: .INDENT 7.0 .TP .B \fBauthor\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Werror=author\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=author\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.author\fP is set to \fBfalse\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBdeprecated\fP An optional boolean. Equivalent to passing \fB\-Werror=deprecated\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=deprecated\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.deprecated\fP is set to \fBfalse\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBdev\fP Removed in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Werror=dev\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=dev\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.dev\fP is set to \fBfalse\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBexperimental\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Werror=experimental\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=experimental\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.experimental\fP is set to \fBfalse\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBinstallAbsoluteDestination\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Werror=install\-absolute\-destination\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=install\-absolute\-destination\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.installAbsoluteDestination\fP is set to \fBfalse\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBpolicy\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Werror=policy\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=policy\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.policy\fP is set to \fBfalse\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBuninitialized\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Werror=uninitialized\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=uninitialized\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.uninitialized\fP is set to \fBfalse\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBunusedCli\fP Added in presets version 12. .sp An optional boolean. Equivalent to passing \fB\-Werror=unused\-cli\fP \%<#\:cmdoption-cmake-Werror> or \fB\-Wno\-error=unused\-cli\fP \%<#\:cmdoption-cmake-Wno-error> on the command line. This may not be set to \fBtrue\fP if \fBwarnings.unusedCli\fP is set to \fBfalse\fP\&. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBdebug\fP An optional object specifying debug options. The object may contain the following fields: .INDENT 7.0 .TP .B \fBoutput\fP An optional boolean. Setting this to \fBtrue\fP is equivalent to passing \fB\-\-debug\-output\fP \%<#\:cmdoption-cmake-debug-output> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBtryCompile\fP An optional boolean. Setting this to \fBtrue\fP is equivalent to passing \fB\-\-debug\-trycompile\fP \%<#\:cmdoption-cmake-debug-trycompile> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBfind\fP An optional boolean. Setting this to \fBtrue\fP is equivalent to passing \fB\-\-debug\-find\fP \%<#\:cmdoption-cmake-debug-find> on the command line. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBtrace\fP Added in presets version 7. .sp An optional object specifying trace options. The object may contain the following fields: .INDENT 7.0 .TP .B \fBmode\fP An optional string that specifies the trace mode. Valid values are: .INDENT 7.0 .TP .B \fBon\fP Causes a trace of all calls made and from where to be printed. Equivalent to passing \fB\-\-trace\fP \%<#\:cmdoption-cmake-trace> on the command line. .TP .B \fBoff\fP A trace of all calls will not be printed. .TP .B \fBexpand\fP Causes a trace with variables expanded of all calls made and from where to be printed. Equivalent to passing \fB\-\-trace\-expand\fP \%<#\:cmdoption-cmake-trace-expand> on the command line. .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBformat\fP An optional string that specifies the format output of the trace. Valid values are: .INDENT 7.0 .TP .B \fBhuman\fP Prints each trace line in a human\-readable format. This is the default format. Equivalent to passing \fB\-\-trace\-format=human\fP \%<#\:cmdoption-cmake-trace-format> on the command line. .TP .B \fBjson\-v1\fP Prints each line as a separate JSON document. Equivalent to passing \fB\-\-trace\-format=json\-v1\fP \%<#\:cmdoption-cmake-trace-format> on the command line. .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBsource\fP An optional array of strings representing the paths of source files to be traced. This field can also be a string, which is equivalent to an array containing one string. Equivalent to passing \fB\-\-trace\-source\fP \%<#\:cmdoption-cmake-trace-source> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBredirect\fP An optional string specifying a path to a trace output file. Equivalent to passing \fB\-\-trace\-redirect\fP \%<#\:cmdoption-cmake-trace-redirect> on the command line. .UNINDENT .UNINDENT .SS Build Preset .sp Added in presets version 2. .sp Each entry of the \fBbuildPresets\fP array is a JSON object that may contain the following fields: .INDENT 0.0 .TP .B \fBname\fP A required string representing the machine\-friendly name of the preset. This identifier is used in the \fBcmake \-\-build \-\-preset\fP \%<#\:cmdoption-cmake-build-preset> option. There must not be two build presets in the union of \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP in the same directory with the same name. However, a build preset may have the same name as a configure, test, package, or workflow preset. .UNINDENT .INDENT 0.0 .TP .B \fBhidden\fP An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the \fB\-\-preset\fP \%<#\:cmdoption-cmake-build-preset> argument and does not have to have a valid \fBconfigurePreset\fP, even from inheritance. \fBhidden\fP presets are intended to be used as a base for other presets to inherit via the \fBinherits\fP field. .UNINDENT .INDENT 0.0 .TP .B \fBinherits\fP An optional array of strings representing the names of presets from which to inherit. This field can also be a string, which is equivalent to an array containing one string. .sp The preset will inherit all of the fields from the \fBinherits\fP presets by default (except \fBname\fP, \fBhidden\fP, \fBinherits\fP, \fBdescription\fP, and \fBdisplayName\fP), but can override them as desired. If multiple \fBinherits\fP presets provide conflicting values for the same field, the earlier preset in the \fBinherits\fP array will be preferred. .sp A preset can only inherit from another preset that is defined in the same file or in one of the files it includes (directly or indirectly). Presets in \fBCMakePresets.json\fP may not inherit from presets in \fBCMakeUserPresets.json\fP\&. .UNINDENT .INDENT 0.0 .TP .B \fBcondition\fP Added in presets version 3. .sp An optional Condition object. .UNINDENT .INDENT 0.0 .TP .B \fBvendor\fP An optional map containing vendor\-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root\-level \fBvendor\fP field. If vendors use their own per\-preset \fBvendor\fP field, they should implement inheritance in a sensible manner when appropriate. .UNINDENT .INDENT 0.0 .TP .B \fBdisplayName\fP An optional string with a human\-friendly name of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBdescription\fP An optional string with a human\-friendly description of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBenvironment\fP An optional map of environment variables. The key is the variable name (which may not be an empty string), and the value is either \fBnull\fP or a string representing the value of the variable. Each variable is set regardless of whether or not a value was given to it by the process\(aqs environment. .sp This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example, if \fBENV_1\fP is \fB$env{ENV_2}\fP, \fBENV_2\fP may not be \fB$env{ENV_1}\fP). \fB$penv{NAME}\fP allows one to prepend or append values to existing environment variables by accessing only values from the parent environment. .sp Environment variables are inherited through the \fBinherits\fP field, and the preset\(aqs environment will be the union of its own \fBenvironment\fP and the \fBenvironment\fP from all its parents. If multiple presets in this union define the same variable, the standard rules of \fBinherits\fP are applied. Setting a variable to \fBnull\fP causes it to not be set, even if a value was inherited from another preset. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 For a CMake project using \fBExternalProject\fP \%<#\:module:ExternalProject> with a configuration preset having environment variables needed in the ExternalProject, use a build preset that inherits that configuration preset or the ExternalProject will not have the environment variables set in the configuration preset. Example: suppose the host defaults to one compiler (say Clang) and the user wishes to use another compiler (say GCC). Set configuration preset environment variables \fBCC\fP \%<#\:envvar:CC> and \fBCXX\fP \%<#\:envvar:CXX> and use a build preset that inherits that configuration preset. Otherwise the ExternalProject may use a different (system default) compiler than the top\-level CMake project. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBconfigurePreset\fP An optional string specifying the name of a configure preset to associate with this build preset. If \fBconfigurePreset\fP is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build directory is inferred from the configure preset, so the build will take place in the same \fBbinaryDir\fP that the configuration did. .UNINDENT .INDENT 0.0 .TP .B \fBinheritConfigureEnvironment\fP An optional boolean that defaults to \fBtrue\fP\&. If \fBtrue\fP, the environment variables from the associated configure preset are inherited after all inherited build preset environments, but before environment variables explicitly specified in this build preset. .UNINDENT .INDENT 0.0 .TP .B \fBjobs\fP An optional integer. Equivalent to passing \fB\-\-parallel\fP \%<#\:cmdoption-cmake-build-j> or \fB\-j\fP on the command line. If the value is \fB0\fP, it is equivalent to passing \fB\-\-parallel\fP with \fB\fP omitted; alternatively, one can define the environment variable \fBCMAKE_BUILD_PARALLEL_LEVEL\fP \%<#\:envvar:CMAKE_BUILD_PARALLEL_LEVEL> as an empty string using the \fBenvironment\fP field. .sp Changed in version 4.3: This field does not accept negative integer values, regardless of the version in the presets file. .UNINDENT .INDENT 0.0 .TP .B \fBtargets\fP An optional string or array of strings. Equivalent to passing \fB\-\-target\fP \%<#\:cmdoption-cmake-build-t> or \fB\-t\fP on the command line. Vendors may ignore the targets property or hide build presets that explicitly specify targets. This field supports macro expansion\&. .UNINDENT .INDENT 0.0 .TP .B \fBconfiguration\fP An optional string. Equivalent to passing \fB\-\-config\fP \%<#\:cmdoption-cmake-build-config> on the command line. .UNINDENT .INDENT 0.0 .TP .B \fBcleanFirst\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-clean\-first\fP \%<#\:cmdoption-cmake-build-clean-first> on the command line. .UNINDENT .INDENT 0.0 .TP .B \fBresolvePackageReferences\fP Added in presets version 4. .sp An optional string that specifies the package resolve mode. .sp Package references are used to define dependencies to packages from external package managers. Currently only NuGet in combination with the Visual Studio Generators \%<#\:visual-studio-generators> is supported. If there are no targets that define package references, this option does nothing. Valid values are: .INDENT 7.0 .TP .B \fBon\fP Causes package references to be resolved before attempting a build. .TP .B \fBoff\fP Package references will not be resolved. Note that this may cause errors in some build environments, such as .NET SDK style projects. .TP .B \fBonly\fP Only resolve package references, but do not perform a build. .UNINDENT .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 The command line parameter \fB\-\-resolve\-package\-references\fP \%<#\:cmdoption-cmake-build-resolve-package-references> will take priority over this setting. If the command line parameter is not provided and this setting is not specified, an environment\-specific cache variable will be evaluated to decide, if package restoration should be performed. .sp When using the Visual Studio Generators \%<#\:visual-studio-generators>, package references are defined using the \fBVS_PACKAGE_REFERENCES\fP \%<#\:prop_tgt:VS_PACKAGE_REFERENCES> property. Package references are restored using NuGet. It can be disabled by setting the \fBCMAKE_VS_NUGET_PACKAGE_RESTORE\fP \%<#\:variable:CMAKE_VS_NUGET_PACKAGE_RESTORE> variable to \fBOFF\fP\&. This can also be done from within a configure preset. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBverbose\fP An optional boolean. If \fBtrue\fP, equivalent to passing \fB\-\-verbose\fP \%<#\:cmdoption-cmake-build-v> on the command line. .UNINDENT .INDENT 0.0 .TP .B \fBnativeToolOptions\fP An optional array of strings. Equivalent to passing options after \fB\-\-\fP \%<#\:cmdoption-cmake--build-0> on the command line. The array values support macro expansion\&. .UNINDENT .SS Test Preset .sp Added in presets version 2. .sp Each entry of the \fBtestPresets\fP array is a JSON object that may contain the following fields: .INDENT 0.0 .TP .B \fBname\fP A required string representing the machine\-friendly name of the preset. This identifier is used in the \fBctest \-\-preset\fP \%<#\:cmdoption-ctest-preset> option. There must not be two test presets in the union of \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP in the same directory with the same name. However, a test preset may have the same name as a configure, build, package, or workflow preset. .UNINDENT .INDENT 0.0 .TP .B \fBhidden\fP An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the \fB\-\-preset\fP \%<#\:cmdoption-ctest-preset> argument and does not have to have a valid \fBconfigurePreset\fP, even from inheritance. \fBhidden\fP presets are intended to be used as a base for other presets to inherit via the \fBinherits\fP field. .UNINDENT .INDENT 0.0 .TP .B \fBinherits\fP An optional array of strings representing the names of presets from which to inherit. This field can also be a string, which is equivalent to an array containing one string. .sp The preset will inherit all of the fields from the \fBinherits\fP presets by default (except \fBname\fP, \fBhidden\fP, \fBinherits\fP, \fBdescription\fP, and \fBdisplayName\fP), but can override them as desired. If multiple \fBinherits\fP presets provide conflicting values for the same field, the earlier preset in the \fBinherits\fP array will be preferred. .sp A preset can only inherit from another preset that is defined in the same file or in one of the files it includes (directly or indirectly). Presets in \fBCMakePresets.json\fP may not inherit from presets in \fBCMakeUserPresets.json\fP\&. .UNINDENT .INDENT 0.0 .TP .B \fBcondition\fP Added in presets version 3. .sp An optional Condition object. .UNINDENT .INDENT 0.0 .TP .B \fBvendor\fP An optional map containing vendor\-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root\-level \fBvendor\fP field. If vendors use their own per\-preset \fBvendor\fP field, they should implement inheritance in a sensible manner when appropriate. .UNINDENT .INDENT 0.0 .TP .B \fBdisplayName\fP An optional string with a human\-friendly name of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBdescription\fP An optional string with a human\-friendly description of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBenvironment\fP An optional map of environment variables. The key is the variable name (which may not be an empty string), and the value is either \fBnull\fP or a string representing the value of the variable. Each variable is set regardless of whether or not a value was given to it by the process\(aqs environment. .sp This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example, if \fBENV_1\fP is \fB$env{ENV_2}\fP, \fBENV_2\fP may not be \fB$env{ENV_1}\fP). \fB$penv{NAME}\fP allows one to prepend or append values to existing environment variables by accessing only values from the parent environment. .sp Environment variables are inherited through the \fBinherits\fP field, and the preset\(aqs environment will be the union of its own \fBenvironment\fP and the \fBenvironment\fP from all its parents. If multiple presets in this union define the same variable, the standard rules of \fBinherits\fP are applied. Setting a variable to \fBnull\fP causes it to not be set, even if a value was inherited from another preset. .UNINDENT .INDENT 0.0 .TP .B \fBconfigurePreset\fP An optional string specifying the name of a configure preset to associate with this test preset. If \fBconfigurePreset\fP is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build directory is inferred from the configure preset, so tests will run in the same \fBbinaryDir\fP that the configuration and build used. .UNINDENT .INDENT 0.0 .TP .B \fBinheritConfigureEnvironment\fP An optional boolean that defaults to \fBtrue\fP\&. If \fBtrue\fP, the environment variables from the associated configure preset are inherited after all inherited test preset environments, but before environment variables explicitly specified in this test preset. .UNINDENT .INDENT 0.0 .TP .B \fBconfiguration\fP An optional string. Equivalent to passing \fB\-\-build\-config\fP \%<#\:cmdoption-ctest-C> on the command line. .UNINDENT .INDENT 0.0 .TP .B \fBoverwriteConfigurationFile\fP An optional array of configuration options to overwrite options specified in the CTest configuration file. Equivalent to passing \fB\-\-overwrite\fP \%<#\:cmdoption-ctest-overwrite> for each value in the array. The array values support macro expansion\&. .UNINDENT .INDENT 0.0 .TP .B \fBoutput\fP An optional object specifying output options. The object may contain the following fields: .INDENT 7.0 .TP .B \fBshortProgress\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-progress\fP \%<#\:cmdoption-ctest-progress> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBverbosity\fP An optional string specifying verbosity level. Must be one of the following: .INDENT 7.0 .TP .B \fBdefault\fP Equivalent to passing no verbosity flags on the command line. .TP .B \fBverbose\fP Equivalent to passing \fB\-\-verbose\fP \%<#\:cmdoption-ctest-V> on the command line. .TP .B \fBextra\fP Equivalent to passing \fB\-\-extra\-verbose\fP \%<#\:cmdoption-ctest-VV> on the command line. .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBdebug\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-debug\fP \%<#\:cmdoption-ctest-debug> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBoutputOnFailure\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-output\-on\-failure\fP \%<#\:cmdoption-ctest-output-on-failure> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBquiet\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-quiet\fP \%<#\:cmdoption-ctest-Q> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBoutputLogFile\fP An optional string specifying a path to a log file. Equivalent to passing \fB\-\-output\-log\fP \%<#\:cmdoption-ctest-O> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBoutputJUnitFile\fP Added in presets version 6. .sp An optional string specifying a path to a JUnit file. Equivalent to passing \fB\-\-output\-junit\fP \%<#\:cmdoption-ctest-output-junit> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBlabelSummary\fP An optional bool. If \fBfalse\fP, equivalent to passing \fB\-\-no\-label\-summary\fP \%<#\:cmdoption-ctest-no-label-summary> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBsubprojectSummary\fP An optional bool. If \fBfalse\fP, equivalent to passing \fB\-\-no\-subproject\-summary\fP \%<#\:cmdoption-ctest-no-subproject-summary> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBmaxPassedTestOutputSize\fP An optional integer specifying the maximum output for passed tests in bytes. Equivalent to passing \fB\-\-test\-output\-size\-passed\fP \%<#\:cmdoption-ctest-test-output-size-passed> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBmaxFailedTestOutputSize\fP An optional integer specifying the maximum output for failed tests in bytes. Equivalent to passing \fB\-\-test\-output\-size\-failed\fP \%<#\:cmdoption-ctest-test-output-size-failed> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBtestOutputTruncation\fP Added in presets version 5. .sp An optional string specifying the test output truncation mode. Equivalent to passing \fB\-\-test\-output\-truncation\fP \%<#\:cmdoption-ctest-test-output-truncation> on the command line. Must be one of the following values: .INDENT 7.0 .IP \(bu 2 \fBtail\fP .IP \(bu 2 \fBmiddle\fP .IP \(bu 2 \fBhead\fP .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBmaxTestNameWidth\fP An optional integer specifying the maximum width of a test name to output. Equivalent to passing \fB\-\-max\-width\fP \%<#\:cmdoption-ctest-max-width> on the command line. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBfilter\fP An optional object specifying how to filter the tests to run. The object may contain the following fields: .INDENT 7.0 .TP .B \fBinclude\fP An optional object specifying which tests to include. The object may contain the following fields: .INDENT 7.0 .TP .B \fBname\fP An optional string specifying a regex for test names. Equivalent to passing \fB\-\-tests\-regex\fP \%<#\:cmdoption-ctest-R> on the command line. This field supports macro expansion\&. .sp CMake regex syntax is described under string(REGEX) \%<#\:regex-specification>\&. .UNINDENT .INDENT 7.0 .TP .B \fBlabel\fP An optional string specifying a regex for test labels. Equivalent to passing \fB\-\-label\-regex\fP \%<#\:cmdoption-ctest-L> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBuseUnion\fP An optional bool. Equivalent to passing \fB\-\-union\fP \%<#\:cmdoption-ctest-U> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBindex\fP An optional object specifying tests to include by test index. The object may contain the following fields. Can also be an optional string specifying a file with the command line syntax for \fB\-\-tests\-information\fP \%<#\:cmdoption-ctest-I>\&. If specified as a string, this field supports macro expansion\&. .INDENT 7.0 .TP .B \fBstart\fP An optional integer specifying a test index at which to start testing. .UNINDENT .INDENT 7.0 .TP .B \fBend\fP An optional integer specifying a test index at which to stop testing. .UNINDENT .INDENT 7.0 .TP .B \fBstride\fP An optional integer specifying the increment. .UNINDENT .INDENT 7.0 .TP .B \fBspecificTests\fP An optional array of integers specifying specific test indices to run. .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBexclude\fP An optional object specifying which tests to exclude. The object may contain the following fields: .INDENT 7.0 .TP .B \fBname\fP An optional string specifying a regex for test names. Equivalent to passing \fB\-\-exclude\-regex\fP \%<#\:cmdoption-ctest-E> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBlabel\fP An optional string specifying a regex for test labels. Equivalent to passing \fB\-\-label\-exclude\fP \%<#\:cmdoption-ctest-LE> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBfixtures\fP An optional object specifying which fixtures to exclude from adding tests. The object may contain the following fields: .INDENT 7.0 .TP .B \fBany\fP An optional string specifying a regex for text fixtures to exclude from adding any tests. Equivalent to passing \fB\-\-fixture\-exclude\-any\fP \%<#\:cmdoption-ctest-FA> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBsetup\fP An optional string specifying a regex for text fixtures to exclude from adding setup tests. Equivalent to passing \fB\-\-fixture\-exclude\-setup\fP \%<#\:cmdoption-ctest-FS> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBcleanup\fP An optional string specifying a regex for text fixtures to exclude from adding cleanup tests. Equivalent to passing \fB\-\-fixture\-exclude\-cleanup\fP \%<#\:cmdoption-ctest-FC> on the command line. This field supports macro expansion\&. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBexecution\fP An optional object specifying options for test execution. The object may contain the following fields: .INDENT 7.0 .TP .B \fBstopOnFailure\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-stop\-on\-failure\fP \%<#\:cmdoption-ctest-stop-on-failure> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBenableFailover\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-F\fP \%<#\:cmdoption-ctest-F> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBjobs\fP An optional integer. Equivalent to passing \fB\-\-parallel\fP \%<#\:cmdoption-ctest-j> on the command line. If the value is \fB0\fP, it is equivalent to unbounded parallelism. .sp Changed in presets version 11: This field can also be a string, in which case it must be empty, and is equivalent to passing \fB\-\-parallel\fP with \fB\fP omitted. .sp Changed in version 4.3: This field does not accept negative integer values, regardless of the version in the presets file. .UNINDENT .INDENT 7.0 .TP .B \fBresourceSpecFile\fP An optional string. Equivalent to passing \fB\-\-resource\-spec\-file\fP \%<#\:cmdoption-ctest-resource-spec-file> on the command line. This field supports macro expansion\&. .UNINDENT .INDENT 7.0 .TP .B \fBtestLoad\fP An optional integer. Equivalent to passing \fB\-\-test\-load\fP \%<#\:cmdoption-ctest-test-load> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBshowOnly\fP An optional string. Equivalent to passing \fB\-\-show\-only\fP \%<#\:cmdoption-ctest-N> on the command line. The string must be one of the following values: .INDENT 7.0 .IP \(bu 2 \fBhuman\fP .IP \(bu 2 \fBjson\-v1\fP .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBrepeat\fP An optional object specifying how to repeat tests. Equivalent to passing \fB\-\-repeat\fP \%<#\:cmdoption-ctest-repeat> on the command line. The object must have the following fields: .INDENT 7.0 .TP .B \fBmode\fP A required string. Must be one of the following values: .INDENT 7.0 .IP \(bu 2 \fBuntil\-fail\fP .IP \(bu 2 \fBuntil\-pass\fP .IP \(bu 2 \fBafter\-timeout\fP .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBcount\fP A required integer. .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBinteractiveDebugging\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-interactive\-debug\-mode 1\fP \%<#\:cmdoption-ctest-interactive-debug-mode> on the command line. If \fBfalse\fP, equivalent to passing \fB\-\-interactive\-debug\-mode 0\fP \%<#\:cmdoption-ctest-interactive-debug-mode> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBscheduleRandom\fP An optional bool. If \fBtrue\fP, equivalent to passing \fB\-\-schedule\-random\fP \%<#\:cmdoption-ctest-schedule-random> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBtimeout\fP An optional integer. Equivalent to passing \fB\-\-timeout\fP \%<#\:cmdoption-ctest-timeout> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBnoTestsAction\fP An optional string specifying the behavior if no tests are found. Must be one of the following values: .INDENT 7.0 .TP .B \fBdefault\fP Equivalent to not passing any value on the command line. .TP .B \fBerror\fP Equivalent to passing \fB\-\-no\-tests=error\fP \%<#\:cmdoption-ctest-no-tests> on the command line. .TP .B \fBignore\fP Equivalent to passing \fB\-\-no\-tests=ignore\fP \%<#\:cmdoption-ctest-no-tests> on the command line. .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fBtestPassthroughArguments\fP Added in presets version 12. .sp An optional array of strings. Each element is forwarded as an argument to every test executable, equivalent to passing arguments after \fBctest \-\-\fP \%<#\:cmdoption-ctest-0> on the command line. .sp When both preset and command\-line passthrough arguments are specified, preset arguments appear first, followed by command\-line arguments. .UNINDENT .UNINDENT .SS Package Preset .sp Added in presets version 6. .sp Each entry of the \fBpackagePresets\fP array is a JSON object that may contain the following fields: .INDENT 0.0 .TP .B \fBname\fP A required string representing the machine\-friendly name of the preset. This identifier is used in the \fBcpack \-\-preset\fP \%<#\:cmdoption-cpack-preset> option. There must not be two package presets in the union of \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP in the same directory with the same name. However, a package preset may have the same name as a configure, build, test, or workflow preset. .UNINDENT .INDENT 0.0 .TP .B \fBhidden\fP An optional boolean specifying whether or not a preset should be hidden. If a preset is hidden, it cannot be used in the \fB\-\-preset\fP \%<#\:cmdoption-cpack-preset> argument and does not have to have a valid \fBconfigurePreset\fP, even from inheritance. \fBhidden\fP presets are intended to be used as a base for other presets to inherit via the \fBinherits\fP field. .UNINDENT .INDENT 0.0 .TP .B \fBinherits\fP An optional array of strings representing the names of presets from which to inherit. This field can also be a string, which is equivalent to an array containing one string. .sp The preset will inherit all of the fields from the \fBinherits\fP presets by default (except \fBname\fP, \fBhidden\fP, \fBinherits\fP, \fBdescription\fP, and \fBdisplayName\fP), but can override them as desired. If multiple \fBinherits\fP presets provide conflicting values for the same field, the earlier preset in the \fBinherits\fP array will be preferred. .sp A preset can only inherit from another preset that is defined in the same file or in one of the files it includes (directly or indirectly). Presets in \fBCMakePresets.json\fP may not inherit from presets in \fBCMakeUserPresets.json\fP\&. .UNINDENT .INDENT 0.0 .TP .B \fBcondition\fP An optional Condition object. .UNINDENT .INDENT 0.0 .TP .B \fBvendor\fP An optional map containing vendor\-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root\-level \fBvendor\fP field. If vendors use their own per\-preset \fBvendor\fP field, they should implement inheritance in a sensible manner when appropriate. .UNINDENT .INDENT 0.0 .TP .B \fBdisplayName\fP An optional string with a human\-friendly name of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBdescription\fP An optional string with a human\-friendly description of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBenvironment\fP An optional map of environment variables. The key is the variable name (which may not be an empty string), and the value is either \fBnull\fP or a string representing the value of the variable. Each variable is set regardless of whether or not a value was given to it by the process\(aqs environment. .sp This field supports macro expansion, and environment variables in this map may reference each other, and may be listed in any order, as long as such references do not cause a cycle (for example, if \fBENV_1\fP is \fB$env{ENV_2}\fP, \fBENV_2\fP may not be \fB$env{ENV_1}\fP). \fB$penv{NAME}\fP allows one to prepend or append values to existing environment variables by accessing only values from the parent environment. .sp Environment variables are inherited through the \fBinherits\fP field, and the preset\(aqs environment will be the union of its own \fBenvironment\fP and the \fBenvironment\fP from all its parents. If multiple presets in this union define the same variable, the standard rules of \fBinherits\fP are applied. Setting a variable to \fBnull\fP causes it to not be set, even if a value was inherited from another preset. .UNINDENT .INDENT 0.0 .TP .B \fBconfigurePreset\fP An optional string specifying the name of a configure preset to associate with this package preset. If \fBconfigurePreset\fP is not specified, it must be inherited from the inherits preset (unless this preset is hidden). The build directory is inferred from the configure preset, so packaging will run in the same \fBbinaryDir\fP that the configuration did and build did. .UNINDENT .INDENT 0.0 .TP .B \fBinheritConfigureEnvironment\fP An optional boolean that defaults to \fBtrue\fP\&. If \fBtrue\fP, the environment variables from the associated configure preset are inherited after all inherited package preset environments, but before environment variables explicitly specified in this package preset. .UNINDENT .INDENT 0.0 .TP .B \fBgenerators\fP An optional array of strings representing generators for CPack to use. .UNINDENT .INDENT 0.0 .TP .B \fBconfigurations\fP An optional array of strings representing build configurations for CPack to package. .UNINDENT .INDENT 0.0 .TP .B \fBvariables\fP An optional map of variables to pass to CPack, equivalent to \fB\-D\fP \%<#\:cmdoption-cpack-D> arguments. Each key is the name of a variable, and the value is the string to assign to that variable. .UNINDENT .INDENT 0.0 .TP .B \fBconfigFile\fP An optional string representing the config file for CPack to use. .UNINDENT .INDENT 0.0 .TP .B \fBoutput\fP An optional object specifying output options. Valid keys are: .INDENT 7.0 .TP .B \fBdebug\fP An optional boolean specifying whether or not to print debug information. A value of \fBtrue\fP is equivalent to passing \fB\-\-debug\fP \%<#\:cmdoption-cpack-debug> on the command line. .UNINDENT .INDENT 7.0 .TP .B \fBverbose\fP An optional boolean specifying whether or not to print verbosely. A value of \fBtrue\fP is equivalent to passing \fB\-\-verbose\fP \%<#\:cmdoption-cpack-V> on the command line. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBpackageName\fP An optional string representing the package name. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 Due to problems with the implementation, this field does not affect the name of the final package file produced. However, other aspects of the package may use the value, leading to inconsistencies. A future CMake release may address this problem, but until then, it is recommended that this field not be used. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBpackageVersion\fP An optional string representing the package version. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 Due to problems with the implementation, this field does not affect the name of the final package file produced. However, other aspects of the package may use the value, leading to inconsistencies. A future CMake release may address this problem, but until then, it is recommended that this field not be used. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fBpackageDirectory\fP An optional string representing the directory in which to place the package. .UNINDENT .INDENT 0.0 .TP .B \fBvendorName\fP An optional string representing the vendor name. .UNINDENT .SS Workflow Preset .sp Added in presets version 6. .sp Each entry of the \fBworkflowPresets\fP array is a JSON object that may contain the following fields: .INDENT 0.0 .TP .B \fBname\fP A required string representing the machine\-friendly name of the preset. This identifier is used in the \fBcmake \-\-workflow \-\-preset\fP \%<#\:cmdoption-cmake-workflow-preset> option. There must not be two workflow presets in the union of \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP in the same directory with the same name. However, a workflow preset may have the same name as a configure, build, test, or package preset. .UNINDENT .INDENT 0.0 .TP .B \fBvendor\fP An optional map containing vendor\-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, it should follow the same conventions as the root\-level \fBvendor\fP field. If vendors use their own per\-preset \fBvendor\fP field, they should implement inheritance in a sensible manner when appropriate. .UNINDENT .INDENT 0.0 .TP .B \fBdisplayName\fP An optional string with a human\-friendly name of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBdescription\fP An optional string with a human\-friendly description of the preset. .UNINDENT .INDENT 0.0 .TP .B \fBsteps\fP A required array of objects describing the steps of the workflow. The first step must be a configure preset, and all subsequent steps must be non\-configure presets whose \fBconfigurePreset\fP field matches the starting configure preset. Each object may contain the following fields: .INDENT 7.0 .TP .B \fBtype\fP A required string. The first step must be \fBconfigure\fP\&. Subsequent steps must be either \fBbuild\fP, \fBtest\fP, or \fBpackage\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fBname\fP A required string representing the name of the configure, build, test, or package preset to run as this workflow step. .UNINDENT .UNINDENT .SS Condition .sp Added in presets version 3. .sp The \fBcondition\fP field of a preset is used to determine whether or not the preset is enabled. For example, this can be used to disable a preset on platforms other than Windows. \fBcondition\fP may be either a boolean, \fBnull\fP, or an object. If it is a boolean, the boolean indicates whether the preset is enabled or disabled. If it is \fBnull\fP, the preset is enabled, but the \fBnull\fP condition is not inherited by any presets that may inherit from the preset. Sub\-conditions (for example in a \fBnot\fP, \fBanyOf\fP, or \fBallOf\fP condition) may not be \fBnull\fP\&. If it is an object, it has the following fields: .INDENT 0.0 .TP .B \fBtype\fP A required string with one of the following values: .INDENT 7.0 .TP .B \fB\(dqconst\(dq\fP Indicates that the condition is constant. This is equivalent to using a boolean in place of the object. The condition object will have the following additional fields: .INDENT 7.0 .TP .B \fBvalue\fP A required boolean which provides a constant value for the condition\(aqs evaluation. .UNINDENT .TP .B \fB\(dqequals\(dq\fP, \fB\(dqnotEquals\(dq\fP Indicates that the condition compares two strings to see if they are equal (or not equal). The condition object will have the following additional fields: .INDENT 7.0 .TP .B \fBlhs\fP First string to compare. This field supports macro expansion. .TP .B \fBrhs\fP Second string to compare. This field supports macro expansion. .UNINDENT .TP .B \fB\(dqinList\(dq\fP, \fB\(dqnotInList\(dq\fP Indicates that the condition searches for a string in a list of strings. The condition object will have the following additional fields: .INDENT 7.0 .TP .B \fBstring\fP A required string to search for. This field supports macro expansion. .TP .B \fBlist\fP A required array of strings to search. This field supports macro expansion, and uses short\-circuit evaluation. .UNINDENT .TP .B \fB\(dqmatches\(dq\fP, \fB\(dqnotMatches\(dq\fP Indicates that the condition searches for a regular expression in a string. The condition object will have the following additional fields: .INDENT 7.0 .TP .B \fBstring\fP A required string to search. This field supports macro expansion. .TP .B \fBregex\fP A required regular expression to search for. This field supports macro expansion. .UNINDENT .UNINDENT .sp \fB\(dqanyOf\(dq\fP, \fB\(dqallOf\(dq\fP .INDENT 7.0 .INDENT 3.5 Indicates that the condition is an aggregation of zero or more nested conditions. The condition object will have the following additional fields: .INDENT 0.0 .TP .B \fBconditions\fP A required array of condition objects. These conditions use short\-circuit evaluation. .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B \fB\(dqnot\(dq\fP Indicates that the condition is an inversion of another condition. The condition object will have the following additional fields: .INDENT 7.0 .TP .B \fBcondition\fP A required condition object. .UNINDENT .UNINDENT .UNINDENT .SS Macro Expansion .sp As mentioned above, some fields support macro expansion. Macros are recognized in the form \fB${}\fP\&. .sp In general, macros are evaluated in the context of the preset being used, even if the macro is in a field that was inherited from another preset. For example, if the \fBBase\fP preset sets variable \fBPRESET_NAME\fP to \fB${presetName}\fP, and the \fBDerived\fP preset inherits from \fBBase\fP, \fBPRESET_NAME\fP will be set to \fBDerived\fP\&. The \fB${fileDir}\fP macro as of preset version \fB12\fP is an exception to this rule. .sp It is an error to not put a closing brace at the end of a macro name. For example, \fB${sourceDir\fP is invalid. A dollar sign (\fB$\fP) followed by anything other than a left curly brace (\fB{\fP) with a possible namespace is interpreted as a literal dollar sign. .sp Recognized macros include: .INDENT 0.0 .TP .B \fB${sourceDir}\fP Path to the project source directory (i.e. the same as \fBCMAKE_SOURCE_DIR\fP \%<#\:variable:CMAKE_SOURCE_DIR>). .TP .B \fB${sourceParentDir}\fP Path to the project source directory\(aqs parent directory. .TP .B \fB${sourceDirName}\fP The last filename component of \fB${sourceDir}\fP\&. For example, if \fB${sourceDir}\fP is \fB/path/to/source\fP, this would be \fBsource\fP\&. .TP .B \fB${presetName}\fP Name specified in the preset\(aqs \fBname\fP field. .sp This is a preset\-specific macro. .TP .B \fB${generator}\fP Generator specified in the preset\(aqs \fBgenerator\fP field. For build and test presets, this will evaluate to the generator specified by \fBconfigurePreset\fP\&. .sp This is a preset\-specific macro. .UNINDENT .INDENT 0.0 .TP .B \fB${hostSystemName}\fP Added in presets version 3. .sp The name of the host operating system. Contains the same value as \fBCMAKE_HOST_SYSTEM_NAME\fP \%<#\:variable:CMAKE_HOST_SYSTEM_NAME>\&. .UNINDENT .INDENT 0.0 .TP .B \fB${fileDir}\fP Added in presets version 4. .sp Path to the directory containing the presets file which defines the preset being used. .sp Changed in presets version 12: This macro \fIalways\fP expands to the directory of the current presets file containing the macro, regardless of the preset being used. .sp For example, consider the following scenario. .INDENT 7.0 .IP \(bu 2 \fB/path/to/CMakePresets.json\fP includes \fB/path/to/subdir/CMakePresets.json\fP\&. .IP \(bu 2 \fB/path/to/subdir/CMakePresets.json\fP defines preset \fBBase\fP, which sets variable \fBMY_DIR\fP to \fB${fileDir}\fP\&. .IP \(bu 2 \fB/path/to/CMakePresets.json\fP defines preset \fBDerived\fP, and \fBDerived\fP inherits from \fBBase\fP\&. .UNINDENT .sp Under preset versions \fB4\fP\-\fB11\fP, \fBMY_DIR\fP will be set to \fB/path/to/\fP when using the \fBDerived\fP preset, and \fB/path/to/subdir/\fP when using the \fBBase\fP preset. .sp When \fB/path/to/subdir/CMakePresets.json\fP specifies version \fB12\fP or above, \fBMY_DIR\fP will always be set to \fB/path/to/subdir/\fP, regardless of the preset being used. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 Since the \fB${fileDir}\fP macro in version 12 is expanded in the context of the current presets file, it is the version of the current file, rather than the version of the root file containing the preset being used, which dictates this behavior. .UNINDENT .UNINDENT .TP .B \fB${dollar}\fP A literal dollar sign (\fB$\fP). .UNINDENT .INDENT 0.0 .TP .B \fB${pathListSep}\fP Added in presets version 5. .sp Native character for separating lists of paths, such as \fB:\fP or \fB;\fP\&. .sp For example, by setting \fBPATH\fP to \fB/path/to/ninja/bin${pathListSep}$env{PATH}\fP, \fB${pathListSep}\fP will expand to the underlying operating system\(aqs character used for concatenation in \fBPATH\fP\&. .TP .B \fB$env{}\fP Environment variable with name \fB\fP\&. The variable name may not be an empty string. If the variable is defined in the \fBenvironment\fP field, that value is used instead of the value from the parent environment. If the environment variable is not defined, this evaluates as an empty string. .sp Note that while Windows environment variable names are case\-insensitive, variable names within a preset are still case\-sensitive. This may lead to unexpected results when using inconsistent casing. For best results, keep the casing of environment variable names consistent. .TP .B \fB$penv{}\fP Similar to \fB$env{}\fP, except that the value only comes from the parent environment, and never from the \fBenvironment\fP field. This allows one to prepend or append values to existing environment variables. For example, setting \fBPATH\fP to \fB/path/to/ninja/bin:$penv{PATH}\fP will prepend \fB/path/to/ninja/bin\fP to the \fBPATH\fP environment variable. This is needed because \fB$env{}\fP does not allow circular references. .TP .B \fB$vendor{}\fP An extension point for vendors to insert their own macros. CMake will not be able to use presets which have a \fB$vendor{}\fP macro, and effectively ignores such presets. However, it will still be able to use other presets from the same file. .sp CMake does not make any attempt to interpret \fB$vendor{}\fP macros. However, to avoid name collisions, IDE vendors should prefix \fB\fP with a very short (preferably <= 4 characters) vendor identifier prefix, followed by a \fB\&.\fP, followed by the macro name. For example, the Example IDE could have \fB$vendor{xide.ideInstallDir}\fP\&. .UNINDENT .SH VERSIONS .sp The JSON schema of CMake presets files follows a version scheme where new versions are added and allowed in newer versions of CMake. .sp A list of the supported versions along with the version of CMake in which they were added and a summary of the new features and changes is given below. .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fB1\fP Added in version 3.19. .sp The initial version supports Configure Presets and Macro Expansion\&. .TP .B \fB2\fP Added in version 3.20. .INDENT 7.0 .IP \(bu 2 Build Presets were added. .IP \(bu 2 Test Presets were added. .UNINDENT .TP .B \fB3\fP Added in version 3.21. .INDENT 7.0 .IP \(bu 2 The Condition object was added for Configure, Build, and Test Presets\&. .IP \(bu 2 Changes to Configure Presets .INDENT 2.0 .IP \(bu 2 The \fBinstallDir\fP field was added. .IP \(bu 2 The \fBtoolchainFile\fP field was added. .IP \(bu 2 The \fBbinaryDir\fP field is now optional. .IP \(bu 2 The \fBgenerator\fP field is now optional. .UNINDENT .IP \(bu 2 Changes to Macro Expansion .INDENT 2.0 .IP \(bu 2 The ${hostSystemName} macro was added. .UNINDENT .UNINDENT .TP .B \fB4\fP Added in version 3.23. .INDENT 7.0 .IP \(bu 2 Includes were added to support including other JSON files in \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP\&. .IP \(bu 2 Changes to Build Presets .INDENT 2.0 .IP \(bu 2 The \fBresolvePackageReferences\fP field was added. .UNINDENT .IP \(bu 2 Changes to Macro Expansion .INDENT 2.0 .IP \(bu 2 The ${fileDir} macro was added. .UNINDENT .UNINDENT .TP .B \fB5\fP Added in version 3.24. .INDENT 7.0 .IP \(bu 2 Changes to Test Presets .INDENT 2.0 .IP \(bu 2 The \fBtestOutputTruncation\fP field was added to the \fBoutput\fP object. .UNINDENT .IP \(bu 2 Changes to Macro Expansion .INDENT 2.0 .IP \(bu 2 The ${pathListSep} macro was added. .UNINDENT .UNINDENT .TP .B \fB6\fP Added in version 3.25. .INDENT 7.0 .IP \(bu 2 Package Presets were added. .IP \(bu 2 Workflow Presets were added. .IP \(bu 2 Changes to Test Presets .INDENT 2.0 .IP \(bu 2 The \fBoutputJUnitFile\fP field was added to the \fBoutput\fP object. .UNINDENT .UNINDENT .TP .B \fB7\fP Added in version 3.27. .INDENT 7.0 .IP \(bu 2 Changes to Configure Presets .INDENT 2.0 .IP \(bu 2 The \fBtrace\fP field was added. .UNINDENT .IP \(bu 2 Changes to Includes .INDENT 2.0 .IP \(bu 2 The \fBinclude\fP field now supports \fB$penv{}\fP macro expansion\&. .UNINDENT .UNINDENT .TP .B \fB8\fP Added in version 3.28. .INDENT 7.0 .IP \(bu 2 The \fB$schema\fP field was added to the root object. .UNINDENT .TP .B \fB9\fP Added in version 3.30. .INDENT 7.0 .IP \(bu 2 Changes to Includes .INDENT 2.0 .IP \(bu 2 The \fBinclude\fP field now supports other types of macro expansion\&. .UNINDENT .UNINDENT .TP .B \fB10\fP Added in version 3.31. .INDENT 7.0 .IP \(bu 2 The optional \fB$comment\fP field was added to support documentation throughout \fBCMakePresets.json\fP and \fBCMakeUserPresets.json\fP\&. .IP \(bu 2 Changes to Configure Presets: .INDENT 2.0 .IP \(bu 2 The \fBgraphviz\fP field was added. .UNINDENT .UNINDENT .TP .B \fB11\fP Added in version 4.3. .INDENT 7.0 .IP \(bu 2 Changes to Test Presets .INDENT 2.0 .IP \(bu 2 The \fBjobs\fP field now accepts an empty string representing \fB\-\-parallel\fP \%<#\:cmdoption-ctest-j> with \fB\fP omitted. .UNINDENT .UNINDENT .TP .B \fB12\fP Added in version 4.4. .INDENT 7.0 .IP \(bu 2 Changes to Configure Presets: .INDENT 2.0 .IP \(bu 2 The \fBdev\fP field is renamed to \fBauthor\fP in \fBwarnings\fP and \fBerrors\fP\&. .IP \(bu 2 The \fBuninitialized\fP and \fBunusedCli\fP fields were added to \fBerrors\fP\&. .IP \(bu 2 The \fBinstallAbsoluteDestination\fP field was added to \fBwarnings\fP and \fBerrors\fP\&. .UNINDENT .IP \(bu 2 Changes to Macro Expansion .INDENT 2.0 .IP \(bu 2 The ${fileDir} macro now always expands to the directory of presets file containing the \fB${fileDir}\fP macro, regardless of whether it is inherited by another preset in a different directory. .UNINDENT .IP \(bu 2 Changes to Test Presets .INDENT 2.0 .IP \(bu 2 The \fBtestPassthroughArguments\fP field was added to forward arguments to test executables. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH SCHEMA .sp \fBThis file\fP provides a machine\-readable JSON schema for the CMake presets file format. .SH Copyright 2000-2026 Kitware, Inc. and Contributors .\" End of generated man page.