Get target details
get_targetQueries the CMake build model to retrieve complete details of one target: artifacts, dependencies, compile flags, defines, includes, sources, and install rules.
Instructions
Full details of one target: artifacts, where it is defined, dependencies, link/archive command fragments, install destinations, and per compile group the language standard, flags, defines and include directories, plus its source files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Target name or File API target 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. | |
| maxSources | No | Maximum number of sources to list. | |
| configuration | No | Build configuration (e.g. Debug, Release) for multi-config generators. Defaults to the first one. | |
| includeSources | No | Include the list of source files. | |
| includeBacktraces | No | Include CMake backtraces (file:line of the command) for sources, defines, includes, etc. |