summaryrefslogtreecommitdiffstats
path: root/Help/command/cmake_parse_arguments.rst
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2015-12-05 18:02:19 (GMT)
committerBrad King <brad.king@kitware.com>2015-12-17 15:45:19 (GMT)
commitab8a280857da5cf8545bd2a6f69b7378f53449a5 (patch)
tree10f014de571d24188cce4d16ef31b2b31186445d /Help/command/cmake_parse_arguments.rst
parente8b148318f1fab26b2289cadc2d0c5e12201169d (diff)
downloadCMake-ab8a280857da5cf8545bd2a6f69b7378f53449a5.zip
CMake-ab8a280857da5cf8545bd2a6f69b7378f53449a5.tar.gz
CMake-ab8a280857da5cf8545bd2a6f69b7378f53449a5.tar.bz2
cmake_parse_arguments: consider duplicate keyword as warning
The behaviour of double specified keywords is rather undefined or at least not clearly documented. This change introduces a strict check and emits a warning in case a keyword has been specified more than once.
Diffstat (limited to 'Help/command/cmake_parse_arguments.rst')
-rw-r--r--Help/command/cmake_parse_arguments.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Help/command/cmake_parse_arguments.rst b/Help/command/cmake_parse_arguments.rst
index 7638b61..6206611 100644
--- a/Help/command/cmake_parse_arguments.rst
+++ b/Help/command/cmake_parse_arguments.rst
@@ -25,6 +25,13 @@ 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.
+
When done, ``cmake_parse_arguments`` will have defined for each of the
keywords listed in ``<options>``, ``<one_value_keywords>`` and
``<multi_value_keywords>`` a variable composed of the given ``<prefix>``