Merge pull request #10898

fe7986e trezor: suppress generated protobuf deprecation warnings (selsta)

ACKs: plowsof, jpk68
This commit is contained in:
tobtoht
2026-07-16 18:10:29 +00:00
+9
View File
@@ -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 ()