mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Add a new `PREDICATE` selector to `list(TRANSFORM)` that uses a user-defined function or macro to decide which elements to transform. The predicate callable receives each element value and an output variable name. It must set the output variable to a truthy or falsy value in PARENT_SCOPE; only elements for which the predicate returns true are passed to the transform action. Adds a shared PredicateEvaluator helper class used by both TRANSFORM PREDICATE and (in a subsequent commit) FILTER PREDICATE. Includes parser wiring, error and success tests covering all existing actions (TOUPPER, TOLOWER, REPLACE, STRIP, GENEX_STRIP, APPEND, PREPEND, APPLY) combined with the PREDICATE selector. Issue: #27761
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
1
|