py-onnx: build 1.15 with c++17 / c++20 when neeed (#46571)

This commit is contained in:
Thomas Madlener 2024-09-26 15:29:58 +02:00 committed by GitHub
parent b95160cd86
commit bbd205543b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,3 +70,16 @@ class PyOnnx(PythonPackage):
# 'python_out' does not recognize dllexport_decl. # 'python_out' does not recognize dllexport_decl.
patch("remove_dllexport_decl.patch", when="@:1.6.0") patch("remove_dllexport_decl.patch", when="@:1.6.0")
# Switch the CMAKE_CXX_STANDARD to 17 if abseil-cpp has been built with
# either of those. (abseil-cpp is pulled in via protobuf)
patch(
"https://github.com/onnx/onnx/commit/1f6e43cb4d7366b2dffa7f70ae88198306e12c6c.patch?full_index=1",
sha256="be12f589bc4113982e4162efcdbd95835a6c161a9a7e10cd1dde026cadedf8aa",
when="@1.15.0 ^abseil-cpp cxxstd=17",
)
patch(
"https://github.com/onnx/onnx/commit/1f6e43cb4d7366b2dffa7f70ae88198306e12c6c.patch?full_index=1",
sha256="be12f589bc4113982e4162efcdbd95835a6c161a9a7e10cd1dde026cadedf8aa",
when="@1.15.0 ^abseil-cpp cxxstd=20",
)