Skip to content

Update CMake FetchContent to use system installed Boost when available.#204

Merged
matthew-mccall merged 4 commits intoopen-algebra:masterfrom
matthew-mccall:cmake-find-package
Mar 10, 2026
Merged

Update CMake FetchContent to use system installed Boost when available.#204
matthew-mccall merged 4 commits intoopen-algebra:masterfrom
matthew-mccall:cmake-find-package

Conversation

@matthew-mccall
Copy link
Collaborator

This pull request updates how Boost and Catch2 dependencies are handled in the CMake configuration, aiming to simplify and modernize dependency management. The most important changes are grouped below by theme.

Dependency management improvements:

  • Updated FetchContent_Declare for Boost in cmake/FetchBoost.cmake to use FIND_PACKAGE_ARGS CONFIG and enabled compatibility targets via BOOST_ENABLE_COMPATIBILITY_TARGETS ON, which improves integration and future-proofs the build setup.
  • Changed FetchContent_Declare for Catch2 in CMakeLists.txt to use FIND_PACKAGE_ARGS, making dependency handling more consistent and flexible.

Linking and target configuration:

  • Modified target_link_libraries in src/CMakeLists.txt to link against Boost::boost instead of individual Boost components, simplifying linkage and reducing maintenance overhead.

Simplified and unified Boost usage by replacing specific libraries with `Boost::boost` target. Adjusted FetchContent calls to include `FIND_PACKAGE_ARGS` and enabled compatibility targets. Updated Catch2 FetchContent for consistency.
@matthew-mccall matthew-mccall requested a review from 404Naz March 10, 2026 20:23
@matthew-mccall matthew-mccall self-assigned this Mar 10, 2026
@matthew-mccall matthew-mccall added the core Related to the OASIS library itself label Mar 10, 2026
@matthew-mccall matthew-mccall changed the title Update CMake FetchContent to use system installed Boost when possible. Update CMake FetchContent to use system installed Boost when available. Mar 10, 2026
@matthew-mccall matthew-mccall merged commit cfe86d9 into open-algebra:master Mar 10, 2026
9 checks passed
@matthew-mccall matthew-mccall deleted the cmake-find-package branch March 10, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Related to the OASIS library itself

Projects

Development

Successfully merging this pull request may close these issues.

2 participants