mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Add a COMPARATOR form to $<LIST:SORT> that orders the list by a caller-defined rule: a <body> evaluated per comparison with the two elements bound to $<_0> and $<_1>, yielding "1" when the first should sort before the second. This brings the custom ordering of list(SORT ... COMPARATOR) to generate time, so elements can be ordered by target properties or any other generator expression. CASE: and ORDER: still apply, while COMPARE: is rejected because the body defines the ordering. Fixes: #27892