From fe7986ec64d156ebad92c3f3a38bf440c0389c35 Mon Sep 17 00:00:00 2001 From: selsta Date: Sat, 11 Jul 2026 02:49:40 +0200 Subject: [PATCH] trezor: suppress generated protobuf deprecation warnings --- cmake/CheckTrezor.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/CheckTrezor.cmake b/cmake/CheckTrezor.cmake index d95fe7002..b436e2df5 100644 --- a/cmake/CheckTrezor.cmake +++ b/cmake/CheckTrezor.cmake @@ -161,6 +161,15 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR) file(READ "${_proto_out_dir}/${file}" file_content) string(REPLACE "PROTOBUF_DEPRECATED_ENUM" "" updated_content "${file_content}") + string(PREPEND updated_content + "#if defined(__GNUC__)\n" + "#pragma GCC diagnostic push\n" + "#pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"\n" + "#endif\n") + string(APPEND updated_content + "#if defined(__GNUC__)\n" + "#pragma GCC diagnostic pop\n" + "#endif\n") file(WRITE "${_proto_out_dir}/${file}" "${updated_content}") endforeach ()