File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,21 @@ endif()
52
52
# from onnx==1.13.1 it requires C++17 when compiling on Windows, and since onnx==1.16.0 on Linux
53
53
target_compile_features (onnx PRIVATE cxx_std_17)
54
54
55
+ # WA to allow build on Debian 9
56
+ if (CMAKE_COMPILER_IS_GNUCXX AND LINUX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
57
+ file (READ onnx/onnx/common/file_utils.h CONTENT )
58
+ string (REPLACE "#include <filesystem>" "" CONTENT "${CONTENT} " )
59
+ string (REPLACE "std::filesystem::path proto_u8_path = std::filesystem::u8path(proto_path);" "" CONTENT "${CONTENT} " )
60
+ string (REPLACE "proto_u8_path" "proto_path" CONTENT "${CONTENT} " )
61
+ file (WRITE onnx/onnx/common/file_utils.h "${CONTENT} " )
62
+
63
+ file (READ onnx/onnx/defs/traditionalml/utils.h CONTENT )
64
+ string (REPLACE "const auto& [type, length]" "const std::pair<int, int>& type_length" CONTENT "${CONTENT} " )
65
+ string (REPLACE "type !=" "type_length.first !=" CONTENT "${CONTENT} " )
66
+ string (REPLACE "length !=" "type_length.second !=" CONTENT "${CONTENT} " )
67
+ file (WRITE onnx/onnx/defs/traditionalml/utils.h "${CONTENT} " )
68
+ endif ()
69
+
55
70
ov_disable_all_warnings(onnx onnx_proto)
56
71
57
72
# install
You can’t perform that action at this time.
0 commit comments