Skip to content

Commit e3a4d14

Browse files
Accept Eigen version 5 as well as 3.4.x. (#985)
# Pull Request Title Fixes #984 --- # Change Description Broadens the valid versions of Eigen to include 5.x.y. The search range syntax is great for this, but only supported in Eigen 3.4.1, and I have 3.4.0, so this also needs to be supported.
2 parents 1958a6f + 8484c92 commit e3a4d14

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ if(BUILD_TESTS)
5555
endif()
5656

5757
# Eigen
58-
find_package(Eigen3 3.4 REQUIRED)
58+
find_package(Eigen3 3.4) # Try to find Eigen 3.4
59+
if(NOT TARGET Eigen3::Eigen)
60+
# If Eigen 3.4 was not found, require any Eigen version after 3.4.1 and before 6
61+
find_package(Eigen3 3.4...5 REQUIRED NO_MODULE)
62+
endif()
5963
target_link_libraries(nextsimlib PUBLIC Eigen3::Eigen)
6064

6165
if(DEFINED PYTHON_EXECUTABLE)

0 commit comments

Comments
 (0)