Merge topic 'list_sort'

49a51a61d7 list: Add options to control the SORT comparison operation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2065
This commit is contained in:
Brad King
2018-06-14 17:55:15 +00:00
committed by Kitware Robot
30 changed files with 391 additions and 11 deletions

View File

@@ -28,7 +28,7 @@ Synopsis
`Ordering`_
list(`REVERSE`_ <list>)
list(`SORT`_ <list>)
list(`SORT`_ <list> [...])
Introduction
^^^^^^^^^^^^
@@ -253,7 +253,23 @@ Reverses the contents of the list in-place.
::
list(SORT <list>)
list(SORT <list> [COMPARE <compare>] [CASE <case>] [ORDER <order>])
Sorts the list in-place alphabetically.
Use the option ``<compare>`` to select the compare type for sorting.
The ``<compare>`` option may be one of:
* ``STRING``: Sorts a list of strings alphabetically.
* ``FILE_BASENAME``: Sort a list of pathnames of files by their basenames.
Use the option ``<case>`` to select a case sensitive or case insensitive sort mode.
The ``<case>`` option may be one of:
* ``SENSITIVE``: Sorts the list alphabetically.
* ``INSENSITIVE``: Sorts the list alphabetically in descending order.
Use the option ``<order>`` to select a case sensitive or case insensitive sort mode.
The ``<order>`` option may be one of:
* ``ASCENDING``: Sorts the list in ascending order.
* ``DESCENDING``: Sorts the list in descending order.