How to limit depth of generated .dot files with --graphviz option

Is there a way to specify a maximum depth of graphs when creating graphviz output?

Something like cmake --graphviz=graph.dot --max-depth=5 that would only output nodes that are a maximum of 5 edges away?

I don’t think so. A feature request would be the way to go I think.

Thanks, created a feature request for this: https://gitlab.kitware.com/cmake/cmake/-/issues/23020