pybind / pybind11

Seamless operability between C++11 and Python
https://pybind11.readthedocs.io/
Other
15.08k stars 2.05k forks source link

[BUG]: undefined Boost::headers with Boost::boost found #5138

Closed Teloze closed 1 month ago

Teloze commented 1 month ago

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

4d0fced

Problem description

in the tests/CMakeLists.txt the target Boost::headers is empty if Boost::boost found. I believe the problem is at https://github.com/pybind/pybind11/blob/4d0fcedc266df1f254da832d86698dfef15bfdf6/tests/CMakeLists.txt#L333 where the TARGET should be Boost::headers, instead of Boost::boost.

Reproducible example code

I use a custom install of Boost 1.71.0 with CMake 3.12.1 on a system (CentOS7) with Boost < 1.51. The custom Boost is found during CMake but the system library is included during make.

Is this a regression? Put the last known working version here if it is.

Not a regression

henryiii commented 1 month ago

That is correct, it is supposed to match the line below.