Skip to content

Commit

Permalink
Added WA for ONNX 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
gkrivor committed Apr 25, 2024
1 parent 85ea997 commit a2e4281
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions thirdparty/onnx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ if(WIN32)
endif()
endif()

# WA to support old compiler version, removes unused header which may block build
if(LINUX)
file(READ onnx/onnx/common/file_utils.h CONTENT)
string(REPLACE "#include <filesystem>" "" CONTENT "${CONTENT}")
string(REPLACE "std::filesystem::path proto_u8_path = std::filesystem::u8path(proto_path);" "" CONTENT "${CONTENT}")
string(REPLACE "proto_u8_path" "proto_path" CONTENT "${CONTENT}")
file(WRITE onnx/onnx/common/file_utils.h "${CONTENT}")
endif()

ov_disable_all_warnings(onnx onnx_proto)

# install
Expand Down

0 comments on commit a2e4281

Please sign in to comment.