Skip to content

cmake:list: Add `PREPEND`, `POP_BACK` and `POP_FRONT`

Alex Turbov requested to merge zaufi/cmake:feature/list-REMOVE-ext into master

Introduce few more sub-commands to list:

  • PREPEND as a complementary action for APPEND;
  • POP_BACK and POP_FRONT assign a value of last/first element(s) to a given variable and removed the corresponding item(s). (Can be used in scenarios like in #18943 (closed))

Synopsis:

    list(POP_BACK <list> [<out-var>...])
    list(POP_FRONT <list> [<out-var>...])
    list(PREPEND <list> [<element>...])

Topic-rename: list-prepend-and-pop-subcommands

Edited by Brad King

Merge request reports