diff options
Diffstat (limited to 'pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch')
-rw-r--r-- | pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch b/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch index 41a7cf54abaa6..0092ea4d1e8ef 100644 --- a/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch +++ b/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch @@ -1,45 +1,20 @@ -From a29cffa646356228d6ec7bd7ce21fe3ab90fdd19 Mon Sep 17 00:00:00 2001 -From: Someone Serge <sergei.kozlukov@aalto.fi> -Date: Wed, 7 Feb 2024 16:59:09 +0000 -Subject: [PATCH] eigen: allow dependency injection - ---- - cmake/external/eigen.cmake | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index c0f7ddc50e..996b83d18a 100644 +index b123adb..aab2483 100644 --- a/cmake/external/eigen.cmake +++ b/cmake/external/eigen.cmake -@@ -1,4 +1,3 @@ -- - if (onnxruntime_USE_PREINSTALLED_EIGEN) - add_library(eigen INTERFACE) - file(TO_CMAKE_PATH ${eigen_SOURCE_PATH} eigen_INCLUDE_DIRS) -@@ -10,14 +9,21 @@ else () - URL ${DEP_URL_eigen} - URL_HASH SHA1=${DEP_SHA1_eigen} - PATCH_COMMAND ${Patch_EXECUTABLE} --ignore-space-change --ignore-whitespace < ${PROJECT_SOURCE_DIR}/patches/eigen/Fix_Eigen_Build_Break.patch -+ FIND_PACKAGE_ARGS NAMES Eigen3 - ) - else() - FetchContent_Declare( - eigen - URL ${DEP_URL_eigen} - URL_HASH SHA1=${DEP_SHA1_eigen} -+ FIND_PACKAGE_ARGS NAMES Eigen3 - ) - endif() +@@ -7,8 +7,13 @@ else () + eigen + URL ${DEP_URL_eigen} + URL_HASH SHA1=${DEP_SHA1_eigen} ++ FIND_PACKAGE_ARGS NAMES Eigen3 + ) + - FetchContent_Populate(eigen) - set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") + FetchContent_MakeAvailable(eigen) + add_library(eigen ALIAS Eigen3::Eigen) -+ + # Onnxruntime doesn't always use `eigen` as a target in + # `target_link_libraries`, sometimes it just uses + # `target_include_directories`: + get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) endif() --- -2.42.0 - |