summaryrefslogtreecommitdiffstats
path: root/Help/command/cmake_parse_arguments.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Help/command/cmake_parse_arguments.rst')
-rw-r--r--Help/command/cmake_parse_arguments.rst32
1 files changed, 17 insertions, 15 deletions
diff --git a/Help/command/cmake_parse_arguments.rst b/Help/command/cmake_parse_arguments.rst
index 8803ec8..824b7dd 100644
--- a/Help/command/cmake_parse_arguments.rst
+++ b/Help/command/cmake_parse_arguments.rst
@@ -21,11 +21,12 @@ respective options.
The first signature reads processes arguments passed in the ``<args>...``.
This may be used in either a :command:`macro` or a :command:`function`.
-The ``PARSE_ARGV`` signature is only for use in a :command:`function`
-body. In this case the arguments that are parsed come from the
-``ARGV#`` variables of the calling function. The parsing starts with
-the ``<N>``-th argument, where ``<N>`` is an unsigned integer. This allows for
-the values to have special characters like ``;`` in them.
+.. versionadded:: 3.7
+ The ``PARSE_ARGV`` signature is only for use in a :command:`function`
+ body. In this case the arguments that are parsed come from the
+ ``ARGV#`` variables of the calling function. The parsing starts with
+ the ``<N>``-th argument, where ``<N>`` is an unsigned integer.
+ This allows for the values to have special characters like ``;`` in them.
The ``<options>`` argument contains all options for the respective macro,
i.e. keywords which can be used when calling the macro without any value
@@ -40,12 +41,11 @@ The ``<multi_value_keywords>`` argument contains all keywords for this
macro which can be followed by more than one value, like e.g. the
``TARGETS`` or ``FILES`` keywords of the :command:`install` command.
-.. note::
-
- All keywords shall be unique. I.e. every keyword shall only be specified
- once in either ``<options>``, ``<one_value_keywords>`` or
- ``<multi_value_keywords>``. A warning will be emitted if uniqueness is
- violated.
+.. versionadded:: 3.5
+ All keywords shall be unique. I.e. every keyword shall only be specified
+ once in either ``<options>``, ``<one_value_keywords>`` or
+ ``<multi_value_keywords>``. A warning will be emitted if uniqueness is
+ violated.
When done, ``cmake_parse_arguments`` will consider for each of the
keywords listed in ``<options>``, ``<one_value_keywords>`` and
@@ -61,10 +61,12 @@ All remaining arguments are collected in a variable
were recognized. This can be checked afterwards to see
whether your macro was called with unrecognized parameters.
-``<one_value_keywords>`` and ``<multi_value_keywords>`` that were given no
-values at all are collected in a variable ``<prefix>_KEYWORDS_MISSING_VALUES``
-that will be undefined if all keywords received values. This can be checked
-to see if there were keywords without any values given.
+.. versionadded:: 3.15
+ ``<one_value_keywords>`` and ``<multi_value_keywords>`` that were given no
+ values at all are collected in a variable
+ ``<prefix>_KEYWORDS_MISSING_VALUES`` that will be undefined if all keywords
+ received values. This can be checked to see if there were keywords without
+ any values given.
Consider the following example macro, ``my_install()``, which takes similar
arguments to the real :command:`install` command: