Skip to content

fix cmake: fix CPM Boost with CMake 4.5 and link used Boost libraries - #1407

Closed
ArkadyRudenko wants to merge 5 commits into
userver-framework:developfrom
ArkadyRudenko:fix-cpm-boost-cmake45
Closed

ArkadyRudenko wants to merge 5 commits into
userver-framework:developfrom
ArkadyRudenko:fix-cpm-boost-cmake45

Conversation

@ArkadyRudenko

@ArkadyRudenko ArkadyRudenko commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the ubuntu (CPM) job.

  • CMake 4.5 (current GitHub ubuntu runner image) rejects Boost.Locale 1.89 source_group(TREE): ".../include/boost/locale" is not a prefix of file ".../include/boost/locale.hpp". Backport the upstream fix (cmake: exclude locale.hpp from source_group tree boostorg/locale#273, commits 1d07074 and f51b58c) via CPM PATCHES; no Boost release contains it yet.
  • With CPM every Boost library has its own include dir, so core must link what it includes: Boost::exception (core/src/components/run.cpp), Boost::algorithm (core sources and core/utest, chaotic-openapi).

Supersedes #1399.

@ArkadyRudenko
ArkadyRudenko requested a review from a team as a code owner November 24, 2026 11:30
@ArkadyRudenko

Copy link
Copy Markdown
Contributor Author

LGTM

@robot-magpie

robot-magpie Bot commented Nov 24, 2026

Copy link
Copy Markdown

Many thanks for the PR! @ArkadyRudenko is now importing your pull request into our internal upstream repository.

@ArkadyRudenko

Copy link
Copy Markdown
Contributor Author

LGTM

@robot-magpie

robot-magpie Bot commented Nov 24, 2026

Copy link
Copy Markdown

Many thanks for the PR! @ArkadyRudenko is now importing your pull request into our internal upstream repository.

@robot-magpie

robot-magpie Bot commented Nov 27, 2026

Copy link
Copy Markdown

✅ This pull request is being closed because it has been successfully merged into our internal monorepository.
Your changes will be pushed to this repository soon. Thank you for your contribution!

@robot-magpie robot-magpie Bot closed this Nov 27, 2026
robot-piglet pushed a commit that referenced this pull request Nov 27, 2026
Fixes the `ubuntu (CPM)` job.

- CMake 4.5 (current GitHub ubuntu runner image) rejects Boost.Locale 1.89 `source_group(TREE)`: `".../include/boost/locale" is not a prefix of file ".../include/boost/locale.hpp"`. Backport the upstream fix (boostorg/locale#274, commits 1d07074 and f51b58c) via CPM `PATCHES`; no Boost release contains it yet.
- With CPM every Boost library has its own include dir, so targets must link what they include: `Boost::exception` (core/src/components/run.cpp), `Boost::algorithm` (core sources and core/utest, chaotic-openapi), `Boost::smart_ptr` (universal/include/userver/utils/make_intrusive_ptr.hpp and core public engine headers).

Supersedes #1399.

---

Pull Request resolved: #1407

Co-authored-by: arudenko02 <arudenko02@userver.tech>
Co-authored-by: arudenko02 <arudenko02@userver.tech>
commit_hash:f256104aa5898b80f45aa4451c57e40a6e562f35
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.

1 participant