summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorfriendlyanon <friendlyanon_@hotmail.com>2021-03-26 12:31:43 (GMT)
committerfriendlyanon <friendlyanon_@hotmail.com>2021-04-06 23:24:44 (GMT)
commit06e69813360560347434a5320f1a366ba004e033 (patch)
tree7d73bde2c3a04079d173cbfce540d40f75413a72 /Help
parent46393e8977ed0aba5536e6108c78db07615616ba (diff)
downloadCMake-06e69813360560347434a5320f1a366ba004e033.zip
CMake-06e69813360560347434a5320f1a366ba004e033.tar.gz
CMake-06e69813360560347434a5320f1a366ba004e033.tar.bz2
cmake-presets: Make generator and binaryDir fields optional
In v3 of the presets, generator and buildDir can be omitted to fall back to regular cmake behavior when these values are not explicitly provided by the user. Fixes: #21987
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-presets.7.rst7
-rw-r--r--Help/manual/presets/schema.json8
-rw-r--r--Help/release/dev/cmake-presets-optional-generator-and-binarydir.rst5
3 files changed, 18 insertions, 2 deletions
diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst
index 8543be3..3714004 100644
--- a/Help/manual/cmake-presets.7.rst
+++ b/Help/manual/cmake-presets.7.rst
@@ -145,7 +145,9 @@ that may contain the following fields:
An optional string representing the generator to use for the preset. If
``generator`` is not specified, it must be inherited from the
- ``inherits`` preset (unless this preset is ``hidden``).
+ ``inherits`` preset (unless this preset is ``hidden``). In version ``3``
+ or above, this field may be omitted to fall back to regular generator
+ discovery procedure.
Note that for Visual Studio generators, unlike in the command line ``-G``
argument, you cannot include the platform name in the generator name. Use
@@ -186,7 +188,8 @@ that may contain the following fields:
This field supports `macro expansion`_. If a relative path is specified,
it is calculated relative to the source directory. If ``binaryDir`` is not
specified, it must be inherited from the ``inherits`` preset (unless this
- preset is ``hidden``).
+ preset is ``hidden``). In version ``3`` or above, this field may be
+ omitted.
``installDir``
diff --git a/Help/manual/presets/schema.json b/Help/manual/presets/schema.json
index 9261519..e066362 100644
--- a/Help/manual/presets/schema.json
+++ b/Help/manual/presets/schema.json
@@ -79,6 +79,14 @@
"type": "object",
"description": "A configure preset object.",
"properties": {
+ "binaryDir": {
+ "type": "string",
+ "description": "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. If binaryDir is not specified, the path is calculated using regular methods."
+ },
+ "generator": {
+ "type": "string",
+ "description": "An optional string representing the generator to use for the preset. If generator is not specified, the normal generator discovery procedure is used. Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead."
+ },
"installDir": {
"type": "string",
"description": "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. If binaryDir is not specified, it must be inherited from the inherits preset (unless this preset is hidden)."
diff --git a/Help/release/dev/cmake-presets-optional-generator-and-binarydir.rst b/Help/release/dev/cmake-presets-optional-generator-and-binarydir.rst
new file mode 100644
index 0000000..7973489
--- /dev/null
+++ b/Help/release/dev/cmake-presets-optional-generator-and-binarydir.rst
@@ -0,0 +1,5 @@
+cmake-presets-optional-generator-and-binarydir
+----------------------------------------------
+
+* :manual:`cmake-presets(7)` now support omitting the ``generator`` and
+ ``binaryDir`` fields.