Skip to content

feat(cmake): Use modern FetchContent approaches when available#6081

Open
LecrisUT wants to merge 5 commits into
pybind:masterfrom
LecrisUT:feat/fetchcontent
Open

feat(cmake): Use modern FetchContent approaches when available#6081
LecrisUT wants to merge 5 commits into
pybind:masterfrom
LecrisUT:feat/fetchcontent

Conversation

@LecrisUT

@LecrisUT LecrisUT commented Jun 3, 2026

Copy link
Copy Markdown

Description

CMake >= 3.24 supports automatic fallback mechanism of find_package -> FetchContent. This is better both for the upstream maintenance and CI, as well as for downstream packagers.

Suggested changelog entry:

  • Introduced PYBIND11_CATCH_TESTS and PYBIND11_EIGEN_TESTS CMake options
  • Switched to using find_package -> FetchContent fallback for third-party dependencies when available (CMake >= 3.24). The DOWNLOAD_* options are deprecated in favor of using PYBIND11_*_TESTS and standard FETCH_CONTENT_* options to control this

@LecrisUT LecrisUT requested a review from henryiii as a code owner June 3, 2026 13:01
@LecrisUT

LecrisUT commented Jun 3, 2026

Copy link
Copy Markdown
Author

A few follow-ups that I am interested:

  • Dropping the complicated handling of eigen3 find_package stuff
  • Dropping the support of the old eigen3 and catch2 versions
  • Dropping the various Find* modules

@LecrisUT LecrisUT force-pushed the feat/fetchcontent branch 5 times, most recently from 2262e42 to 2cfcab4 Compare June 3, 2026 16:29
@LecrisUT LecrisUT force-pushed the feat/fetchcontent branch from 2cfcab4 to 0c774fc Compare June 3, 2026 16:53
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