mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge topic 'macro'
dcf11cbcdc Help: Mention endmacro argument as legacy only.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2606
This commit is contained in:
@@ -7,7 +7,7 @@ Start recording a macro for later invocation as a command
|
||||
|
||||
macro(<name> [<arg1> ...])
|
||||
<commands>
|
||||
endmacro(<name>)
|
||||
endmacro()
|
||||
|
||||
Defines a macro named ``<name>`` that takes arguments
|
||||
named ``<arg1>``, ...
|
||||
@@ -31,6 +31,11 @@ behavior. Checking that ``${ARGC}`` is greater than ``#`` is the only
|
||||
way to ensure that ``${ARGV#}`` was passed to the function as an extra
|
||||
argument.
|
||||
|
||||
Per legacy, the :command:`endmacro` command admits an optional
|
||||
``<name>`` argument. If used, it must be a verbatim repeat of the
|
||||
argument of the opening ``macro`` command.
|
||||
|
||||
|
||||
See the :command:`cmake_policy()` command documentation for the behavior
|
||||
of policies inside macros.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user