summaryrefslogtreecommitdiffstats
path: root/Help/command/cmake_command.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-27 15:21:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-27 15:21:21 (GMT)
commitc58b9c5ab94d674c76a17e6154f05e0e8c5c37d1 (patch)
tree0f7c58ab4cb216c9e29308aeab4cb5251e397e2c /Help/command/cmake_command.rst
parentd6fa2311275ce3c6f0e42989e523158952fc1449 (diff)
parent54e4f2ad455817bed165fa1cb3682acbd93a8a1a (diff)
downloadCMake-c58b9c5ab94d674c76a17e6154f05e0e8c5c37d1.zip
CMake-c58b9c5ab94d674c76a17e6154f05e0e8c5c37d1.tar.gz
CMake-c58b9c5ab94d674c76a17e6154f05e0e8c5c37d1.tar.bz2
Merge topic 'cmake_command-command'
54e4f2ad45 cmake_command: Add command to INVOKE other commands by name Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !4286
Diffstat (limited to 'Help/command/cmake_command.rst')
-rw-r--r--Help/command/cmake_command.rst40
1 files changed, 40 insertions, 0 deletions
diff --git a/Help/command/cmake_command.rst b/Help/command/cmake_command.rst
new file mode 100644
index 0000000..9281647
--- /dev/null
+++ b/Help/command/cmake_command.rst
@@ -0,0 +1,40 @@
+cmake_command
+-------------
+
+Call meta-operations on CMake commands.
+
+Synopsis
+^^^^^^^^
+
+.. parsed-literal::
+
+ cmake_command(`INVOKE`_ <command> [<args>...])
+
+Introduction
+^^^^^^^^^^^^
+
+This command will call meta-operations on built-in CMake commands or
+those created via the :command:`macro` or :command:`function` commands.
+
+Invoking
+^^^^^^^^
+
+.. _INVOKE:
+
+.. code-block:: cmake
+
+ cmake_command(INVOKE <command> [<args>...])
+
+Invokes the named ``<command>`` with the given arguments (if any).
+For example, the code:
+
+.. code-block:: cmake
+
+ set(message_command "message")
+ cmake_command(INVOKE ${message_command} STATUS "Hello World!")
+
+is equivalent to
+
+.. code-block:: cmake
+
+ message(STATUS "Hello World!")