cmake_target

Resolver-generated logical CMake target.

Description#

cmake_workspace creates these targets from a checked configured graph. They make native CMake names, dependency edges, sources, artifacts, include directories, definitions, and configuration identity available to ordinary Once graph queries.

The target is resolver-owned. Do not declare it directly in once.toml. It does not build independently; use the paired cmake_project target.

Attributes#

AttributeTypeRequiredDefaultDescription
cmake_namestringyesOriginal configured CMake target name
cmake_typestringyesConfigured CMake target type
artifactslist<string>no[]Normalized configured artifact paths
include_dirslist<string>no[]Normalized configured include directories
compile_definitionslist<string>no[]Configured compile definitions
snapshot_fingerprintstringyesCanonical fingerprint shared by imported targets
_cmake_resolvedboolresolver-ownedfalsePrevents direct manifest authoring

Dependency Edges#

EdgeAcceptsDescription
depscmake_targetConfigured logical CMake dependencies

Providers#

The target emits cmake_target with its logical metadata and dependency identifiers.

Capabilities#

This target has no executable capability.

Query Example#

bash
once query targets --kind cmake_target
once query target cmake-greeting
once query 'MATCH (root:Target {id: "cmake-greeting"})-[:DEPENDS_ON*]->(dep:Target) RETURN dep.id, dep.kind'

See the CMake guide for the complete build and snapshot workflow.