Is it possible to hide targets/commands when running `cmake --build build --target help`?

I was wondering if there’s a way to hide certain targets and commands when running cmake --build build --target help or mark them as private somehow? A lot of the targets in my project are “internal only”, meaning that they’re only relevant for other targets and not users. I’ve searched around but couldn’t find anything. Thanks for the help.

You’re probably interested in the proposal I made in issue 23566. That discusses being able to indicate targets that should be hidden in IDEs. That has a lot of overlap with what you’re asking about here.

1 Like