[build] Make Protobuf optional in CMake build (#7061)

This commit is contained in:
Tyler Veness
2024-09-12 23:44:19 -07:00
committed by GitHub
parent b9409a4bcf
commit d44b651558
77 changed files with 168 additions and 73 deletions

View File

@@ -109,11 +109,13 @@ void DataLogReaderThread::ReadMain() {
schema, err);
}
} else if (auto filename = wpi::remove_prefix(name, "/.schema/proto:")) {
#ifndef NO_PROTOBUF
// protobuf descriptor handling
if (!m_protoDb.Add(*filename, data)) {
wpi::print("could not decode protobuf '{}' filename '{}'\n", name,
*filename);
}
#endif
}
}