hidden presets are intended to be used as a base for Have to have a valid generator or binaryDir, even from Will not show up in the CMake GUI, and does not If a preset is hidden, it cannot be used in the -preset= argument, However, a configure preset may have the same name as a build, test,Īn optional boolean specifying whether or not a preset should be hidden. There must not be two configure presets in the union of CMakePresets.jsonĪnd CMakeUserPresets.json in the same directory with the same name. This identifier is used in the cmake -preset option. That may contain the following fields: nameĪ required string representing the machine-friendly name of the preset. Configure Preset ¶Įach entry of the configurePresets array is a JSON object Guaranteed to be provided by the project. Included multiple times from the same file or from different files.įiles directly or indirectly included from CMakePresets.json should be If a.json includesī.json, b.json cannot include a.json. Include cycles are not allowed among files. The file must include the other file either directly or indirectly. If a preset file contains presets that inherit from presets in another file, Implicitly includes CMakePresets.json, even with no include field, If CMakePresets.json andĬMakeUserPresets.json are both present, CMakeUserPresets.json Files includedīy these files can also include other files. With the include field in file version 4 and later. Includes ¶ĬMakePresets.json and CMakeUserPresets.json can include other files This is allowed in preset files specifying version 6 or above. workflowPresetsĪn optional array of Workflow Preset objects. packagePresetsĪn optional array of Package Preset objects. This is allowed in preset files specifying version 2 or above. testPresetsĪn optional array of Test Preset objects. buildPresetsĪn optional array of Build Preset objects. This is allowed in preset files specifying version 1 or above. configurePresetsĪn optional array of Configure Preset objects. The value of each field can be anythingĭesired by the vendor, though will typically be a map. However, the keys should be a vendor-specific domain nameįollowed by a /-separated path. Interpret the contents of this field except to verify that it is a map if vendorĪn optional map containing vendor-specific information. See Includes for discussion of the constraints on included files. This is allowed in preset files specifying version 4 or above. If the filenamesĪre not absolute, they are considered relative to the current file. includeĪn optional array of strings representing files to include. patchĪn optional integer representing the patch version. minorĪn optional integer representing the minor version. This object consists of the following fields: majorĪn optional integer representing the major version. cmakeMinimumRequiredĪn optional object representing the minimum version of CMake needed toīuild this project. The root object recognizes the following fields: versionĪ required integer representing the version of the JSON schema. The files are a JSON document with an object as the root: Project is using Git, CMakePresets.json may be tracked, andĬMakeUserPresets.json should be added to the. CMakePresets.json is meant to specify project-wide buildĭetails, while CMakeUserPresets.json is meant for developers to specifyĬMakePresets.json may be checked into a version control system, andĬMakeUserPresets.json should NOT be checked in. (though at least one must be present if -preset They both have exactly the same format, and both are optional Supports files included with the include field.ĬMakePresets.json and CMakeUserPresets.json live in the project's rootĭirectory. Specify common configure options and share them with others. CMake supports two main files,ĬMakePresets.json and CMakeUserPresets.json, that allow users to Or for users who frequently use the same build. One problem that CMake users often face is sharing settings with other peopleįor common ways to configure a project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |