Bladeren bron

Add -Werror=missing-declarations to test builds

Treat missing declarations as an error for test builds, to prevent
future updates which add functions without properly declaring them.
This will prevent broken builds in more restrictive build environments.
Brad Larson 8 jaren geleden
bovenliggende
commit
0d9a34c7b2
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/Makefile.am

+ 1 - 1
src/Makefile.am

@@ -925,7 +925,7 @@ no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la      \
                         ../gmock/gtest/lib/libgtest_main.la
                         ../gmock/gtest/lib/libgtest_main.la
 no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
 no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
 no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
 no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
-                           -Wall -Wconversion -Werror
+                           -Wall -Wconversion -Werror -Werror=missing-declarations
 nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
 nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
 
 
 TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
 TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \