Task: Declare the Boost component in CMake, not only the vcpkg port
Table of Contents
This page documents a task in the Hotfix: a Boost library landed without its vcpkg port story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
Close the other half of the same dependency. The vcpkg port makes the
header install; the root find_package(Boost ... COMPONENTS ...) is what
the estate uses to declare which Boost libraries the project builds
against, and what CMake checks before anything compiles.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Hotfix: a Boost library landed without its vcpkg port |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-09-28 |
3. Acceptance
- The root
find_package(Boost ... COMPONENTS ...)listsmultiprecision, as it already lists the other header-only libraries the tree uses (crc,scope_exit,circular_buffer). - A configure with the port declared succeeds and reports the component found.
- A configure with the port undeclared fails, naming
boost_multiprecision, before anything compiles. - The decimal suite still passes and the tree still builds.
4. Plan
- Add the component to the root list and configure, reading the
Found Boost ... found components:line back rather than trusting the exit code alone. - Prove the gate by removing the manifest line, reconfiguring, and reading the failure; restore it and reconfigure.
- Rebuild the affected library and re-run the decimal suite.
5. Measurements
Every number this task claims about a tree, with the command that produced it and the commit it was measured at.
| What | Value | Command | Commit |
|---|---|---|---|
| Components the root find_package resolves | 12, multiprecision among them |
cmake --preset linux-clang-debug-make |
this branch |
| Configure with the port undeclared | fails, exit 1, naming boost_multiprecision |
same, with the manifest line removed | this branch |
| Configure with the port declared | succeeds, exit 0 | same | this branch |
| Decimal suite | 71 assertions, 17 cases, all pass | ores.utility.tests "[decimal]" |
this branch |
6. Notes
- The declaration is what makes the failure early. Without the port, CMake stops at configure time with the component's name; with only the vcpkg line and no component, the same defect appears as a missing header after vcpkg has run and hundreds of files have compiled.
- A component that is header-only still belongs in the list.
crc,scope_exitandcircular_bufferare all header-only and all listed, and none of them is linked: the estate linksBoost::boostfor header-only use and specific targets such asBoost::jsononly where a compiled library is needed.multiprecisionjoins the list on the same terms, which is why no link line changed. - The component resolves against vcpkg's Boost because
share/boost_multiprecision/boost_multiprecision-config.cmakeis installed by the port. It was verified against that tree directly, and separately with a two-file CMake project, because the first attempt picked up the system Boost and reported the component missing – a different Boost, not a different answer.
7. PRs
| PR | Title |
|---|---|
8. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
9. Result
The root find_package(Boost 1.88 REQUIRED COMPONENTS ...) lists
multiprecision, and a configure reports twelve components found, that one
among them. The decimal suite passes 71 assertions in 17 cases and
ores.utility.tests builds.
The gate is proved in both directions. With the port declared, the
configure succeeds. With the manifest line removed, the configure fails
before compiling and names boost_multiprecision, which is the failure the
original defect should have produced: seconds instead of twenty minutes,
and the port to add rather than a header that cannot be found.