Get target dependency graph
get_target_dependenciesRetrieves the CMake targets a specified target depends on or those that depend on it, returning direct connections and complete transitive chains.
Instructions
Returns the targets a target depends on (dependencies) or the targets depending on it (dependents), directly or transitively, including an adjacency list for the transitive graph.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Target name or id. | |
| buildDir | No | Build directory (absolute, or relative to a workspace root). A source directory with a single build directory is also accepted. May be omitted when the workspace has exactly one build directory. | |
| direction | No | dependencies | |
| transitive | No | ||
| configuration | No | Build configuration (e.g. Debug, Release) for multi-config generators. Defaults to the first one. |