googleapis / googleapis/google-cloud-cpp

Avoid spurious warnings on `*.pb.h` files with MSVC

Aperta
#14,507 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
type: cleanup
Lingua principale
C++
Stelle
659
Fork
462
Merge medio
1g 2h
PR unite (30g)
89

Descrizione

Files generated by Protobuf have warnings under MSVC. There is little we can do to fix the code to avoid warnings, and disabling the warnings for all the code would mask problems in *our* code.

We can disable warnings in headers with MSVC if the header is included as `#include ` as opposed to `#include "foo/bar.pb.h"`. We have managed to fix this for googleapis protos, and the compute protos, but the test protos in `google-cloud-cpp` are not.

If we move the protos to `protos/...` (as oppposed to `google/cloud/...` or `generator/...`) then we can tweak Bazel and CMake to support include via angle brackets, then the warnings go away, and then we can start using newer versions of Protobuf with MSVC.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.