It is calculated relative to the build directory, and if not found, toolchainFileĪn optional string representing the path to the toolchain file. Rather than the object form, the behavior is the same as "set". If no strategy field is given, or if the field uses the string form Ignore the field, but the IDE can use them to set up the environment Knows how to set up the Visual C++ environment from theĪrchitecture and toolset fields. Useful if, for example, a preset uses the Ninja generator, and an IDE "external"ĭo not set the value, even if the generator supports it. That do not support the respective field. This will result in an error for generators strategyĪn optional string telling CMake how to handle the architecture or See cmake -A option for possible values for architectureĮach may be either a string or an object with the following fields: valueĪn optional string representing the value. Optional fields representing the platform and toolset, respectively, for G argument, you cannot include the platform name Note that for Visual Studio generators, unlike in the command line Or above, this field may be omitted to fall back to regular generator Inherits preset (unless this preset is hidden). Generator is not specified, it must be inherited from the generatorĪn optional string representing the generator to use for the preset. descriptionĪn optional string with a human-friendly description of the preset. Vendor field, they should implement inheritance in a sensible mannerĪn optional string with a human-friendly name of the preset. However, it should follow the same conventions as the Interpret the contents of this field except to verify that it is a map This is allowed in preset files specifyingĪn optional map containing vendor-specific information. Presets in CMakePresets.json may not inherit from presets inĪn optional Condition object. Same file or in one of the files it includes (directly or indirectly). The same field, the earlier preset in the inherits array will beĪ preset can only inherit from another preset that is defined in the If multiple inherits presets provide conflicting values for Presets by default (except name, hidden, inherits,ĭescription, and displayName), but can override them asĭesired. The preset will inherit all of the fields from the inherits This field can also be a string, which is equivalent to an array inheritsĪn optional array of strings representing the names of presets to inheritįrom. Other presets to inherit via the inherits field. 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 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 |