Skip to content
Closed
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
4 changes: 3 additions & 1 deletion cmake/external/onnxruntime_external_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,9 @@ if(TARGET ONNX::onnx_proto AND NOT TARGET onnx_proto)
add_library(onnx_proto ALIAS ONNX::onnx_proto)
endif()

find_package(Eigen3 CONFIG)
if (onnxruntime_USE_PREINSTALLED_EIGEN)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onnxruntime_USE_PREINSTALLED_EIGEN is not used for indicating whether find_package should be used for looking for Eigen or not. It is a deprecated feature. I even couldn't remember why it was added. It is used with another cmake variable.

By default, cmake always call find_package first, unless FETCHCONTENT_TRY_FIND_PACKAGE_MODE is set to NEVER.

find_package(Eigen3 CONFIG)
endif()
if(Eigen3_FOUND)
get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
else()
Expand Down