Explorar el Código

Help: Mention endmacro argument as legacy only.

Same change as previously done for function, if, while, ...
Joachim Wuttke (l) hace 7 años
padre
commit
dcf11cbcdc
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      Help/command/macro.rst

+ 6 - 1
Help/command/macro.rst

@@ -7,7 +7,7 @@ Start recording a macro for later invocation as a command
 
 
   macro(<name> [<arg1> ...])
   macro(<name> [<arg1> ...])
     <commands>
     <commands>
-  endmacro(<name>)
+  endmacro()
 
 
 Defines a macro named ``<name>`` that takes arguments
 Defines a macro named ``<name>`` that takes arguments
 named ``<arg1>``, ...
 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
 way to ensure that ``${ARGV#}`` was passed to the function as an extra
 argument.
 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
 See the :command:`cmake_policy()` command documentation for the behavior
 of policies inside macros.
 of policies inside macros.