cmake_language: Rename command from cmake_command

Also rename the `INVOKE` signature to `CALL`.

Fixes: #20732
This commit is contained in:
Brad King
2020-05-21 13:25:13 -04:00
parent 3c5d52579b
commit 94c1e4fdb3
92 changed files with 127 additions and 128 deletions

View File

@@ -1,5 +1,5 @@
cmake_command
-------------
cmake_language
--------------
Call meta-operations on CMake commands.
@@ -8,8 +8,8 @@ Synopsis
.. parsed-literal::
cmake_command(`INVOKE`_ <command> [<args>...])
cmake_command(`EVAL`_ CODE <code>...)
cmake_language(`CALL`_ <command> [<args>...])
cmake_language(`EVAL`_ CODE <code>...)
Introduction
^^^^^^^^^^^^
@@ -17,24 +17,24 @@ Introduction
This command will call meta-operations on built-in CMake commands or
those created via the :command:`macro` or :command:`function` commands.
``cmake_command`` does not introduce a new variable or policy scope.
``cmake_language`` does not introduce a new variable or policy scope.
Invoking Commands
^^^^^^^^^^^^^^^^^
Calling Commands
^^^^^^^^^^^^^^^^
.. _INVOKE:
.. _CALL:
.. code-block:: cmake
cmake_command(INVOKE <command> [<args>...])
cmake_language(CALL <command> [<args>...])
Invokes the named ``<command>`` with the given arguments (if any).
Calls 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!")
cmake_language(CALL ${message_command} STATUS "Hello World!")
is equivalent to
@@ -49,7 +49,7 @@ Evaluating Code
.. code-block:: cmake
cmake_command(EVAL CODE <code>...)
cmake_language(EVAL CODE <code>...)
Evaluates the ``<code>...`` as CMake code.
@@ -62,7 +62,7 @@ For example, the code:
set(C TRUE)
set(condition "(A AND B) OR C")
cmake_command(EVAL CODE "
cmake_language(EVAL CODE "
if (${condition})
message(STATUS TRUE)
else()

View File

@@ -44,14 +44,14 @@ can be invoked through any of
foo()
Foo()
FOO()
cmake_command(INVOKE foo)
cmake_language(CALL foo)
and so on. However, it is strongly recommended to stay with the
case chosen in the function definition. Typically functions use
all-lowercase names.
The :command:`cmake_command(INVOKE ...)` command can also be used to invoke the
function.
The :command:`cmake_language(CALL ...)` command can also be used to
invoke the function.
Arguments
^^^^^^^^^

View File

@@ -42,14 +42,14 @@ can be invoked through any of
foo()
Foo()
FOO()
cmake_command(INVOKE foo)
cmake_language(CALL foo)
and so on. However, it is strongly recommended to stay with the
case chosen in the macro definition. Typically macros use
all-lowercase names.
The :command:`cmake_command(INVOKE ...)` command can also be used to invoke the
macro.
The :command:`cmake_language(CALL ...)` command can also be used to
invoke the macro.
Arguments
^^^^^^^^^