Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: respect onnxruntime_USE_PREINSTALLED_EIGEN option #22057

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Member

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
Loading