我尝试编译gmock标头并收到大量警告,例如:
/opt/foreign_components/gmock-1.7.0/fused-src/gtest/gtest.h:10298:40:警告:'testing :: internal :: ParamIteratorInterface * testing :: internal :: ValuesInIteratorRangeGenerator :: Iterator: :Clone()const [with T = bool]'可以标记为覆盖[-Wsuggest-override]
我已经在-isystem
中包含了gmock标头,如下所述:
How to suppress GCC warnings from library headers?
我使用:
g ++-建议覆盖-I ../ -I ../../generic/ -isystem /opt/foreign_components/gmock-1.7.0/fused-src/gmock/ -isystem / opt / foreign_components / gmock -1.7.0 / fused-src -g-墙-pedantic -pthread -std = c ++ 14 -O2 /opt/foreign_components/gmock-1.7.0/fused-src/gmock-gtest-all.cc -c- o build-ut-std-xsysg-nomemdbg-o2-dynamic-noncov // opt / foreign_components / gmock-1.7.0 /fused-src/gmock-gtest-all.o
我该如何解决这个问题?