Build system: Revise pybind11 procedures #2503
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The way we downloaded header-only library was a little janky inasmuch as it
did not actually "build" pybind11, which although there is nothing to compile
per se for this header-only project, nonetheless that's what would generate
the cmake config files defining the targets to import. And the presence of our
FindPybind11.cmake module inhibited cmake finding the config files even when
present elsewhere.
This patch:
No longer automatically downloads pybind11 as part of our cmake config step.
Eliminates FindPybind11.cmake module in favor of always expecting a
pybind11Config.cmake as part of a true pybind11 install.
Correctly uses the imported pybind11::pybind11 target instead of
futzing with ${PYBIND11_INCLUDE_DIR}.
Supplies a new src/build-scripts/build_pybind11.bash script that will do the
download and "build" of pybind11 (into the ext/ area by default) for those
users who need it and don't have it on their systems.