summaryrefslogtreecommitdiff
path: root/Help
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-30 15:38:44 +0200
committerBrad King <brad.king@kitware.com>2016-08-16 13:45:05 -0400
commit49ad7f9af84dd46e5527e6fefaa47d8bde748bca (patch)
tree2b12ae61ca840d2b6581f3ccbf12296cffc5e6b7 /Help
parent1d408dc10f492d060b8b9546c3ed3521d7051fd8 (diff)
downloadcmake-49ad7f9af84dd46e5527e6fefaa47d8bde748bca.tar.gz
cmake: Add `cmake -E capabilities` mode
Add `cmake -E capabilities` to report on generators, cmake version and possibly other static capabilities of cmake. Closes: #15462
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake.1.rst37
-rw-r--r--Help/release/dev/cmake-capabilities.rst6
2 files changed, 43 insertions, 0 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 8f7c33685a..2ccc6be105 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -180,6 +180,43 @@ CMake provides builtin command-line tools through the signature::
Run ``cmake -E`` or ``cmake -E help`` for a summary of commands.
Available commands are:
+``capabilities``
+ Report cmake capabilities in JSON format. The output is a JSON object
+ with the following keys:
+
+ ``version``
+ A JSON object with version information. Keys are:
+
+ ``string``
+ The full version string as displayed by cmake ``--version``.
+ ``major``
+ The major version number in integer form.
+ ``minor``
+ The minor version number in integer form.
+ ``patch``
+ The patch level in integer form.
+ ``suffix``
+ The cmake version suffix string.
+ ``isDirty``
+ A bool that is set if the cmake build is from a dirty tree.
+
+ ``generators``
+ A list available generators. Each generator is a JSON object with the
+ following keys:
+
+ ``name``
+ A string containing the name of the generator.
+ ``toolsetSupport``
+ ``true`` if the generator supports toolsets and ``false`` otherwise.
+ ``platformSupport``
+ ``true`` if the generator supports platforms and ``false`` otherwise.
+ ``extraGenerators``
+ A list of strings with all the extra generators compatible with
+ the generator.
+
+ ``serverMode``
+ ``true`` if cmake supports server-mode and ``false`` otherwise.
+
``chdir <dir> <cmd> [<arg>...]``
Change the current working directory and run a command.
diff --git a/Help/release/dev/cmake-capabilities.rst b/Help/release/dev/cmake-capabilities.rst
new file mode 100644
index 0000000000..7abb9736cc
--- /dev/null
+++ b/Help/release/dev/cmake-capabilities.rst
@@ -0,0 +1,6 @@
+cmake-capabilities
+------------------
+
+* :manual:`cmake(1)` gained a ``-E capabilities`` option to provide a
+ machine-readable (JSON) description of the capabilities of the
+ cmake tool (available generators, etc.).