mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
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.
This commit is contained in:
committed by
Brad King
parent
e8b148318f
commit
ab8a280857
@@ -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>``
|
||||
|
||||
Reference in New Issue
Block a user