Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,811
    • Issues 3,811
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

An update will be applied May 24th, between 12PM and 1PM EDT (UTC -400). The site may be slow during that time.

  • CMake
  • CMakeCMake
  • Issues
  • #19908

Closed
Open
Created Oct 31, 2019 by Alan W. Irwin@airwin

Remove ambiguity in list(REMOVE_ITEM...) documentation

If I apply cmake -P to the following CMake logic

set(list a b c a b c)
message(STATUS "list = ${list}")
list(REMOVE_ITEM list b a)
message(STATUS "list = ${list}")

the result is

-- list = a;b;c;a;b;c
-- list = c;c

That is, all instances of "b" and "a" are removed.

The reason I had to do the above test is the current documentation of list(REMOVE_ITEM...) is ambiguous about whether all instances or the first instances of the specified items are removed. So I suggest the following documentation change to remove that ambiguity:

- Removes the given items from the list.
+ Removes all instances of the given items from the list.

Being clear about this difference is important given that the name of REMOVE_ITEM gives the impression that single instances are removed.

Edited Oct 31, 2019 by Alan W. Irwin
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking