Skip to content

Fix build with CMake 4 and Boost >= 1.89 - #39

Open
Robert108 wants to merge 1 commit into
masterfrom
fix_cmake4_boost190
Open

Robert108 wants to merge 1 commit into
masterfrom
fix_cmake4_boost190

Conversation

@Robert108

Copy link
Copy Markdown
Contributor

Summary

The project fails to build with CMake 4.x and recent Boost (tested with CMake 4.2.3 and Boost 1.90):

  • Boost.System: it is header-only, and Boost 1.89 removed its CMake package, so find_package(Boost REQUIRED COMPONENTS system) fails. It is now an optional component, with a fallback to Boost::headers when Boost::system is not available.

  • Asio: these APIs were removed in Boost 1.87 and are replaced in the library and the tests:

    • address_v4::from_string → make_address_v4
    • address::from_string → make_address
    • io_context::reset() → restart()
    • io_service → io_context

    The replacements have been available since Boost 1.66.

  • iso22133 submodule: bumped to pick up its CMake 4 fix, Fix configuring with CMake 4 iso22133#54. The fix commit is based on the previously pinned commit (6bbcee7), so no other upstream changes come along. Current iso22133 master removes TEST_MODE_UNAVAILABLE, which src/iso22133object.cpp still uses.

Merge RI-SE/iso22133#54 first, using a merge commit rather than squash, so the pinned submodule commit stays reachable from iso22133 master.

Testing

  • On CMake 4.2.3, GCC and Boost 1.90, the library, demo and tests build.
  • With BUILD_TESTING=ON and TZ=UTC, all tests pass except the two test_multipleSimulatedISOObjects tests. Those failed only because a local ISO_objectDemo instance was holding ports 53240/53241.
  • EncodeOSEM.Date in iso22133 fails when the local timezone is not UTC. That problem predates this change.

🤖 Generated with Claude Code

- Boost.System is header-only and Boost 1.89 removed its CMake package,
  so request it as an optional component and fall back to Boost::headers.
- Replace Asio APIs removed in Boost 1.87: address(_v4)::from_string ->
  make_address(_v4), io_context::reset -> restart, io_service ->
  io_context. The replacements are available since Boost 1.66.
- Update iso22133 submodule with its CMake 4 fix (RI-SE/iso22133#54).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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