Skip to content

build.jam: fix malformed alias so b2 install generates cmake config#74

Open
jll63 wants to merge 1 commit into
boostorg:developfrom
jll63:fix/b2-alias
Open

build.jam: fix malformed alias so b2 install generates cmake config#74
jll63 wants to merge 1 commit into
boostorg:developfrom
jll63:fix/b2-alias

Conversation

@jll63
Copy link
Copy Markdown
Collaborator

@jll63 jll63 commented May 25, 2026

Summary

build.jam declares the boost_openmethod alias with usage-requirements written as a literal source name and the alias placed outside the explicit block. The boost-library openmethod rule then cannot detect the library's interface, and b2 install skips the cmake config files for openmethod.

This breaks downstream consumers that call find_package(Boost CONFIG REQUIRED COMPONENTS openmethod) against a b2-installed Boost — including the unified-cmake CI job on Windows, which currently fails with:

Could not find a package configuration file provided by
"boost_openmethod" (requested version 1.92.0) with any of the following names:
  boost_openmethodConfig.cmake
  boost_openmethod-config.cmake

Fix

Move the alias inside explicit and put <include>include <library>$(boost_dependencies) in the proper usage-requirements slot (the 5th colon-separated argument). This matches the pattern used by every other header-only Boost library (assert, core, describe, mp11, preprocessor, ...).

explicit
    [ alias boost_openmethod : : : : <include>include <library>$(boost_dependencies) ]
    [ alias all : boost_openmethod test ]
    ;

Test plan

  • Verify CI's unified-cmake test (Windows, b2-installed) now passes
  • Verify b2 install produces <prefix>/lib/cmake/boost_openmethod-<version>/boost_openmethod-config.cmake
  • Verify find_package(Boost CONFIG REQUIRED COMPONENTS openmethod) succeeds against a b2-installed Boost

@cppalliance-bot
Copy link
Copy Markdown

cppalliance-bot commented May 25, 2026

An automated preview of the documentation is available at https://74.openmethod.prtest3.cppalliance.org/libs/openmethod/doc/html/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-05-25 00:45:42 UTC

Two problems prevented `b2 install` from producing
`lib/cmake/boost_openmethod-<version>/boost_openmethod-config.cmake`,
breaking downstream consumers that use `find_package(Boost CONFIG
REQUIRED COMPONENTS openmethod)` (and the unified-cmake CI job):

1. The `boost_openmethod` alias used `usage-requirements` as a literal
   source name instead of the 5th argument position, and lived outside
   the `explicit` block. Move it inside `explicit` and put
   `<include>include <library>$(boost_dependencies)` in the
   usage-requirements slot, matching `assert`, `core`, `mp11`,
   `preprocessor`, etc.

2. The `call-if : boost-library openmethod` invocation had no `install`
   option, so the Jamroot fallback path declared empty install targets
   and `install-cmake-config` was called with no library names — no
   config files were generated. Add `: install boost_openmethod` so the
   library name reaches `install-or-stage-cmake-config`.

Verified locally on Windows: `b2 install` now produces
`lib/cmake/boost_openmethod-1.92.0/boost_openmethod-config.cmake`
(and the matching `-config-version.cmake`) defining `Boost::openmethod`.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.27%. Comparing base (814a8e0) to head (c245a80).
⚠️ Report is 7 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #74      +/-   ##
===========================================
- Coverage    94.34%   93.27%   -1.07%     
===========================================
  Files           43       41       -2     
  Lines         2916     2811     -105     
===========================================
- Hits          2751     2622     -129     
- Misses         165      189      +24     

see 26 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3632b00...c245a80. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants