From 5ca4c217b56a047639dcb9616e913a00069740a7 Mon Sep 17 00:00:00 2001 From: Krivoruchko Date: Thu, 25 Apr 2024 18:23:04 +0400 Subject: [PATCH] Trying to remove WA --- thirdparty/onnx/CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/thirdparty/onnx/CMakeLists.txt b/thirdparty/onnx/CMakeLists.txt index 641751e067fafc..7fe577c9bee40d 100644 --- a/thirdparty/onnx/CMakeLists.txt +++ b/thirdparty/onnx/CMakeLists.txt @@ -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 " "" 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)