Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Internal:

Bug fixes:

- Fixed test builds with installed Eigen 5 by improving `Eigen3` CMake package detection.
[#6036](https://github.com/pybind/pybind11/pull/6036)

- Fixed move semantics of `scoped_ostream_redirect` to preserve buffered output and avoid crashes when moved redirects restore stream buffers.
[#6033](https://github.com/pybind/pybind11/pull/6033)

Expand Down
7 changes: 7 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,17 @@ if(PYBIND11_TEST_FILES_EIGEN_I GREATER -1)

else()
find_package(Eigen3 3.2.7 QUIET CONFIG)
if(NOT Eigen3_FOUND)
find_package(Eigen3 5 QUIET CONFIG)
endif()
set(EIGEN3_FOUND ${Eigen3_FOUND})
set(EIGEN3_VERSION ${Eigen3_VERSION})

if(NOT EIGEN3_FOUND)
# Couldn't load via target, so fall back to allowing module mode finding, which will pick up
# tools/FindEigen3.cmake
# This MODULE-mode fallback is for older Eigen 3 setups; Eigen 5 is expected to be found
# via the CONFIG-mode probes above.
find_package(Eigen3 3.2.7 QUIET)
endif()
endif()
Expand Down
Loading