Skip to content

Commit

Permalink
Trying to remove WA
Browse files Browse the repository at this point in the history
  • Loading branch information
gkrivor committed Apr 25, 2024
1 parent 21cc8b8 commit 5ca4c21
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions thirdparty/onnx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,9 @@ if(WIN32)
if(MINGW)
target_compile_definitions(onnx PRIVATE OPTIONAL=OPTIONAL_PLACEHOLDER)
endif()
endif()

# WA to support old compiler version, removes unused header which may block build
if(CMAKE_COMPILER_IS_GNUCXX AND LINUX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
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}")
else()
target_compile_features(onnx PRIVATE cxx_std_17)
target_link_libraries(onnx PRIVATE stdc++fs)
endif()

ov_disable_all_warnings(onnx onnx_proto)
Expand Down

0 comments on commit 5ca4c21

Please sign in to comment.