Skip to content

CMake: Boost CONFIG Mode - #64

Merged
lucafedeli88 merged 2 commits into
ECP-WarpX:developmentfrom
ax3l:topic-boost-config
Sep 24, 2026
Merged

lucafedeli88 merged 2 commits into
ECP-WarpX:developmentfrom
ax3l:topic-boost-config

Conversation

@ax3l

@ax3l ax3l commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Find Boost via its own BoostConfig.cmake instead of CMake's FindBoost module. FindBoost triggers a CMP0167 warning with CMake 3.30+.

Close #55

  • Require Boost 1.71+ (was 1.66). 1.70 was the first release with a config file but had bugs that 1.71 fixed.
  • No CMake minimum bump needed.
  • Link Boost::headers.
  • Tests: set BOOST_TEST_DYN_LINK automatically when Boost.Test is a shared library. The PXRMP_BOOST_TEST_DYN_LINK option never took effect, so it is removed.

Breaks: setups without BoostConfig.cmake, such as conda-forge libboost-headers alone (use libboost-devel, see BLAST-WarpX/warpx#7296) and RHEL 8/9 system Boost.

Tested: CMake 3.31.6 and Boost 1.85. No warnings with -Werror=dev, and all tests pass.

Follow-ups:

Find Boost via its own CMake config package (`BoostConfig.cmake`)
instead of CMake's deprecated `FindBoost` module, which warns with
CMake 3.30+ (policy CMP0167).

- require Boost 1.71+ (first `BoostConfig.cmake` in 1.70 has known
  issues, fixed in 1.71)
- link `Boost::headers`
- tests: set `BOOST_TEST_DYN_LINK` if `Boost::unit_test_framework`
  is a shared library; removes the `PXRMP_BOOST_TEST_DYN_LINK`
  option, which was never used (tests checked `PXRMP_BOOST_TEST_DYN`)
- document the requirement in the README

Close ECP-WarpX#55

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ax3l
ax3l force-pushed the topic-boost-config branch from 2e0437c to 8d61231 Compare September 23, 2026 17:45
Comment thread multi_physics/QED/CMakeLists.txt Outdated
Comment thread multi_physics/QED/README.md Outdated
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

@lucafedeli88 lucafedeli88 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot , @ax3l

@lucafedeli88
lucafedeli88 merged commit 630b223 into ECP-WarpX:development Sep 24, 2026
6 checks passed
@ax3l
ax3l deleted the topic-boost-config branch September 24, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Boost Warning: CMake 3.30+

2 participants