Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system: Revise pybind11 procedures #2503

Merged
merged 1 commit into from
Mar 2, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Mar 1, 2020

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.

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.
@lgritz lgritz merged commit e20b956 into AcademySoftwareFoundation:master Mar 2, 2020
@lgritz lgritz deleted the lg-pybind branch March 2, 2020 22:56
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Mar 2, 2020
)

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.
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.

None yet

1 participant