trezor: suppress generated protobuf deprecation warnings

This commit is contained in:
selsta
2026-07-11 02:49:40 +02:00
parent d46a05e8c8
commit fe7986ec64
+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 ()