Skip to content

Commit

Permalink
misc/onnx: Fix build with protobuf 22+
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpoet committed Dec 14, 2023
1 parent bb628fc commit b4f7ce8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion misc/onnx/Makefile
Expand Up @@ -13,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
#BUILD_DEPENDS= bash:shells/bash
LIB_DEPENDS= libprotobuf.so:devel/protobuf

USES= cmake:testing compiler:c++11-lang python:build
USES= cmake:testing compiler:c++17-lang python:build

USE_GITHUB= yes

Expand Down
11 changes: 11 additions & 0 deletions misc/onnx/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
--- CMakeLists.txt.orig 2023-08-24 22:20:34 UTC
+++ CMakeLists.txt
@@ -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()

0 comments on commit b4f7ce8

Please sign in to comment.