CMP0121.rst 689 B

123456789101112131415161718192021
  1. CMP0121
  2. -------
  3. .. versionadded:: 3.21
  4. The :command:`list` command now detects invalid indices.
  5. Prior to CMake version 3.21, the :command:`list` command's ``GET``,
  6. ``INSERT``, ``SUBLIST``, and ``REMOVE_AT`` subcommands did not detect invalid
  7. index arguments.
  8. The ``OLD`` behavior of this policy is for invalid indices to be treated as
  9. their integer value (if any) at the start of the string. For example,
  10. ``2good4you`` is a ``2`` and ``not_an_integer`` is a ``0``. The ``NEW``
  11. behavior is for invalid indices to trigger an error.
  12. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.21
  13. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  14. .. include:: STANDARD_ADVICE.txt
  15. .. include:: DEPRECATED.txt