Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: python: use system pybind11 if installed
Fixes builds on offline hosts (common on HPC clusters), which otherwise fail with failure to fetch pybind11 from the Internet, introduced in c13efff: CMake Error at pybind11-subbuild/pybind11-populate-prefix/tmp/pybind11-populate-gitclone.cmake:31 (message): Failed to clone repository: 'https://github.com/pybind/pybind11.git' Also, make build friendly to distribution packages. Distribution package recipe should be in control of (1) dependencies to build against (e.g. some distros are on pybind11 2.5, and it should be used unless it's incompatible), and (2) when fetching happens vs when building happens. So, there is a need for a packager-friendly build mode where the build system doesn't go out and fetch whatever dependencies it chooses whenever it chooses. This patch gives priority to the system pybind11 with fallback to fetching.
- Loading branch information