- Status: Accepted
- Date: 2026-06-14
- Deciders: Daniel Polo (maintainer)
- Related: ADR-0004 §5 (distribution phasing — this is Phase 2), ADR-0028 (the install/export rules the recipe builds on), ADR-0030 (the sibling vcpkg port, same shape), ROADMAP §7.9 (the item),
conan/(the artifacts this ADR governs).
ADR-0004 §5 Phase 2 is package-registry distribution; ROADMAP §7.8 delivered the vcpkg half (ADR-0030) and §7.9 is the Conan half. The same reasoning applies: "publish to ConanCenter" is a pull request against conan-io/conan-center-index, reviewed and merged on the index maintainers' cadence, with a per-release follow-up obligation. And the same favourable precondition holds — the library already installs a complete find_package package (ADR-0028), so a build-from-source recipe is a thin wrapper.
This ADR deliberately mirrors ADR-0030 so the two Phase-2 paths stay symmetric and easy to maintain together.
We ship a Conan 2.x recipe in this repository, under conan/ (conanfile.py + a test_package/), pinned to the v1.0.0 source tag by SHA256. The recipe builds from source and delegates the build/install to the project's CMake rules (ADR-0028). Because Conan generates its own consumer-side config via CMakeDeps, the recipe drops the upstream-bundled CMake config and pkg-config from the package and re-exposes the target through package_info — cmake_file_name = pbr_memory_pool, cmake_target_name = pbr::memory_pool — so a Conan consumer writes the identical find_package(pbr_memory_pool CONFIG REQUIRED) + pbr::memory_pool. Registry publication (ConanCenter or self-hosted) is deferred; the recipe is written to ConanCenter conventions and is creatable locally today (conan create conan/).
Sub-decisions:
- Build from source, reuse ADR-0028.
CMakeToolchain+CMakeconfigure (tests/benchmarks off) → build →cmake.install(). No build/install logic is duplicated. - Conan owns the consumer config; drop the bundled one. After
cmake.install()the recipe removeslib/cmake,lib/pkgconfig, andsharefrom the package, so there is exactly one config a Conan consumer sees — Conan's generated one — avoiding two competingpbr_memory_poolConfig.cmakeon the consumer'sCMAKE_PREFIX_PATH. The target name is preserved viapackage_info. - Version single-sourced; SHA256-pinned. The source URL is derived from
version, so a bump touches onlyversion+ thesha256(Conan'sget()verifies SHA256, vs vcpkg's SHA512 — the only material difference from ADR-0030). test_packageis part of the deliverable. A minimalfind_package+ link + run consumer thatconan createbuilds, so the recipe is self-verifying once Conan is available — and the package'sstatic-library/fPIC/cppstd>=17contract is declared (package_type,options,check_min_cppstd).
- Publish to ConanCenter now instead of an in-repo recipe. Rejected for this milestone, same reasoning as ADR-0030: gated on external review, not unilaterally completable, and a per-release obligation taken on at the worst moment. The in-repo recipe is creatable/consumable today; the index PR is a documented follow-up.
- Keep the upstream-bundled CMake config in the Conan package (don't drop
lib/cmake). Rejected: it would leave twopbr_memory_poolConfig.cmakevisible to a CMakeDeps consumer (the bundled one and Conan's generated one) — a confusing, order-dependent setup. Conan's idiom is for the recipe to own the consumer config viapackage_info. - Header-describe the package manually (skip
cmake.install()). Rejected: duplicates ADR-0028's layout and drifts from it; building through the project's install keeps one source of truth (same call as ADR-0030). - Conan 1.x recipe (or a 1.x/2.x dual recipe). Rejected: Conan 2.x is the current line and ConanCenter's baseline; a 1.x recipe would be legacy maintenance for shrinking benefit.
- Pin to a branch / unhashed source. Rejected: non-reproducible; a recipe must pin an immutable, hashed source (
sha256).
Positive
- A working Conan consumption path today (
conan create conan/), with the samepbr::memory_pooltarget asfind_package/FetchContent/ vcpkg. - Symmetric with the vcpkg port (ADR-0030): both build from source through ADR-0028, both pin
v1.0.0, both defer registry publication — one mental model, two managers. - ConanCenter-submission-ready (recipe +
test_package); promotion is a mechanical follow-up. - Reproducible (SHA256-pinned tag); version single-sourced.
Negative / limitations
- The recipe was not built through a live
conan createlocally (Conan is not provisioned on the maintainer's box); its Python syntax is validated and the source-tarball SHA256 was verified by download, but the first real build will happen on a consumer's machine or in a future CI job. A Conan-CI smoke job is a candidate follow-up (with the M8 governance work, alongside the vcpkg one). - Until publication, consumers create the package from this recipe rather than pulling it from a remote.
- Per-release maintenance: bump
version+sha256(documented inconan/README.md); plus a ConanCenter PR once the recipe is upstreamed.
Documentation updates landing in the same PR
docs/adr/README.md— index row for ADR-0031.- ROADMAP §7.9 — checkbox flipped (closes Milestone 7's stretch items).
README.md— a Conan consumption note alongside vcpkg.CHANGELOG.mdUnreleased—Addedentry.
- ADR-0004 §5; ADR-0028; ADR-0030 — the sibling vcpkg decision.
conan/—conanfile.py,test_package/, and the usage / publication guide.- Conan 2.x docs —
https://docs.conan.io/2/;CMakeToolchain,CMakeDeps,cmake_layout,package_infoproperties.