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

onnxruntime: ensure conan dependencies are used when versions are overriden #22155

Closed
Closed
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 recipes/onnxruntime/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ patches:
patch_description: "Ensures the forward compatibility with the newest versions of re2 library."
patch_type: "portability"
patch_source: "https://github.com/microsoft/onnxruntime/commit/126e7bf15fa4af8621814b82a3f7bd0d786f0239.patch"
- patch_file: "patches/1.14.1-0006-cmake-dependencies.patch"
patch_description: "CMake: ensure conan dependencies are used (upstreamed future versions)"
patch_type: "conan"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- a/cmake/external/onnxruntime_external_deps.cmake
+++ b/cmake/external/onnxruntime_external_deps.cmake
@@ -115,7 +115,7 @@
URL_HASH SHA1=${DEP_SHA1_protobuf}
SOURCE_SUBDIR cmake
PATCH_COMMAND ${ONNXRUNTIME_PROTOBUF_PATCH_COMMAND}
- FIND_PACKAGE_ARGS 3.20.2 NAMES Protobuf
+ FIND_PACKAGE_ARGS NAMES Protobuf
)
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests" FORCE)
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
@@ -158,7 +158,7 @@
nlohmann_json
URL ${DEP_URL_json}
URL_HASH SHA1=${DEP_SHA1_json}
- FIND_PACKAGE_ARGS 3.10 NAMES nlohmann_json
+ FIND_PACKAGE_ARGS NAMES nlohmann_json
)

#TODO: include clog first
@@ -257,7 +257,7 @@
GSL
URL ${DEP_URL_microsoft_gsl}
URL_HASH SHA1=${DEP_SHA1_microsoft_gsl}
- FIND_PACKAGE_ARGS 4.0 NAMES Microsoft.GSL
+ FIND_PACKAGE_ARGS NAMES Microsoft.GSL
)
endif()

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onn
index 9effd1a2db..a059c28e36 100644
--- a/cmake/external/onnxruntime_external_deps.cmake
+++ b/cmake/external/onnxruntime_external_deps.cmake
@@ -152,7 +152,7 @@
URL ${DEP_URL_protobuf}
URL_HASH SHA1=${DEP_SHA1_protobuf}
PATCH_COMMAND ${ONNXRUNTIME_PROTOBUF_PATCH_COMMAND}
- FIND_PACKAGE_ARGS 3.21.12 NAMES Protobuf
+ FIND_PACKAGE_ARGS NAMES Protobuf
)
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests" FORCE)
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
@@ -173,6 +173,7 @@ FetchContent_Declare(
date
URL ${DEP_URL_date}
Expand All @@ -46,6 +55,24 @@ index 9effd1a2db..a059c28e36 100644
)

set(JSON_BuildTests OFF CACHE INTERNAL "")
@@ -193,7 +195,7 @@
nlohmann_json
URL ${DEP_URL_json}
URL_HASH SHA1=${DEP_SHA1_json}
- FIND_PACKAGE_ARGS 3.10 NAMES nlohmann_json
+ FIND_PACKAGE_ARGS NAMES nlohmann_json
)

#TODO: include clog first
@@ -292,7 +294,7 @@
GSL
URL ${DEP_URL_microsoft_gsl}
URL_HASH SHA1=${DEP_SHA1_microsoft_gsl}
- FIND_PACKAGE_ARGS 4.0 NAMES Microsoft.GSL
+ FIND_PACKAGE_ARGS NAMES Microsoft.GSL
)
endif()

@@ -300,6 +302,7 @@ FetchContent_Declare(
safeint
URL ${DEP_URL_safeint}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onn
index 8e412c7847..0e2482d7de 100644
--- a/cmake/external/onnxruntime_external_deps.cmake
+++ b/cmake/external/onnxruntime_external_deps.cmake
@@ -166,7 +166,7 @@
URL ${DEP_URL_protobuf}
URL_HASH SHA1=${DEP_SHA1_protobuf}
PATCH_COMMAND ${ONNXRUNTIME_PROTOBUF_PATCH_COMMAND}
- FIND_PACKAGE_ARGS 3.21.12 NAMES Protobuf
+ FIND_PACKAGE_ARGS NAMES Protobuf
)
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests" FORCE)
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
@@ -187,6 +187,7 @@ FetchContent_Declare(
date
URL ${DEP_URL_date}
Expand All @@ -46,6 +55,24 @@ index 8e412c7847..0e2482d7de 100644
)

set(JSON_BuildTests OFF CACHE INTERNAL "")
@@ -207,7 +209,7 @@
nlohmann_json
URL ${DEP_URL_json}
URL_HASH SHA1=${DEP_SHA1_json}
- FIND_PACKAGE_ARGS 3.10 NAMES nlohmann_json
+ FIND_PACKAGE_ARGS NAMES nlohmann_json
)

#TODO: include clog first
@@ -306,7 +308,7 @@
GSL
URL ${DEP_URL_microsoft_gsl}
URL_HASH SHA1=${DEP_SHA1_microsoft_gsl}
- FIND_PACKAGE_ARGS 4.0 NAMES Microsoft.GSL
+ FIND_PACKAGE_ARGS NAMES Microsoft.GSL
)
endif()

@@ -314,6 +316,7 @@ FetchContent_Declare(
safeint
URL ${DEP_URL_safeint}
Expand Down
Loading