From 19998317be411820e5d183725a39bead3480de7f Mon Sep 17 00:00:00 2001 From: Po-Chuan Hsieh Date: Fri, 15 Dec 2023 00:22:46 +0800 Subject: misc/py-onnx: Fix build with protobuf 22+ --- misc/py-onnx/Makefile | 2 +- misc/py-onnx/files/patch-CMakeLists.txt | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'misc/py-onnx') diff --git a/misc/py-onnx/Makefile b/misc/py-onnx/Makefile index ef62aca59178..2ca2a40f231a 100644 --- a/misc/py-onnx/Makefile +++ b/misc/py-onnx/Makefile @@ -21,7 +21,7 @@ RUN_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.6.2.1:devel/py-typing-extensions@${PY_FLAVOR} -USES= compiler:c11 python shebangfix +USES= compiler:c++17-lang python shebangfix USE_PYTHON= distutils concurrent autoplist CXXFLAGS+= -Dstat64=stat diff --git a/misc/py-onnx/files/patch-CMakeLists.txt b/misc/py-onnx/files/patch-CMakeLists.txt index 57ed278e4e2f..07e389904c09 100644 --- a/misc/py-onnx/files/patch-CMakeLists.txt +++ b/misc/py-onnx/files/patch-CMakeLists.txt @@ -1,4 +1,4 @@ ---- CMakeLists.txt.orig 2023-04-12 23:29:41 UTC +--- CMakeLists.txt.orig 2023-08-08 18:33:06 UTC +++ CMakeLists.txt @@ -18,7 +18,7 @@ project(onnx C CXX) option(ONNX_BUILD_BENCHMARKS "Build ONNX micro-benchmarks" OFF) @@ -9,3 +9,12 @@ option(ONNX_GEN_PB_TYPE_STUBS "Generate protobuf python type stubs" ON) option(ONNX_WERROR "Build with Werror" OFF) option(ONNX_COVERAGE "Build with coverage instrumentation" OFF) +@@ -58,7 +58,7 @@ endif() + # Required to use /std:c++17 or higher on Windows + # For other platforms, set C++11 as standard for the whole project + if(NOT MSVC) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 17) + else() + string(APPEND CMAKE_CXX_FLAGS " /std:c++17") + endif() -- cgit v1.2.3