# Profile: C++ / CMake / Conan

Optional A2C profile for native C++ projects using CMake and Conan 2.

## Expected structure extensions

```
<project>/
├── CMakeLists.txt
├── CMakePresets.json
├── conanfile.py
├── conan/
│   └── profiles/
├── src/
├── include/
├── tests/
└── docs/
    ├── architecture/
    └── adr/
```

## Documentation expectations

- Architecture doc references build graph and dependency model
- ADRs for toolchain, layout, and Conan integration decisions
- CMake preset names documented in architecture or ADR

## Typical ADR topics

| Category | Example |
|----------|---------|
| `adr(build)` | CMake + Conan 2 as authoritative build |
| `adr(layout)` | Public headers under `include/` |
| `adr(build)` | Ninja vs Visual Studio generator policy |

## Pre-commit expectations

- Shared `.pre-commit-config.yaml` for Markdown, YAML, Python tooling, and other stack-appropriate hooks
- Changed files by default; deliberate `pre-commit run --all-files` only for explicit cleanup
- See [docs/workflow/pre-commit-policy.md](../../docs/workflow/pre-commit-policy.md)

## CI expectations

- Preset-based configure and build on Linux, Windows, macOS
- Pre-commit on changed files in CI — not `--all-files` by default
- Docs-portal sync on `docs/**` changes if portal-integrated

## Related upstream reference

For detailed CMake/Conan policy in LibESys superbuild workspaces, see `superbuild-workflow` docs when this profile is used in that context.

## Prompt hints

When using `implementation-batch` prompts:

- Reference accepted build ADRs before adding targets
- One CMake target or subsystem per batch when possible
- Do not add Conan recipes until build ADR is Accepted

## Adoption

Record profile selection in project `AGENTS.md` and ADR-0000 or a dedicated `adr(workflow):` ADR.
