]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
cmake: take over some fatal warnings from autotools
authorRalf Habacker <ralf.habacker@freenet.de>
Thu, 11 Nov 2021 12:24:06 +0000 (13:24 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 18 Nov 2021 12:52:22 +0000 (12:52 +0000)
Adopt various fatal warnings from the autotools build system
to see corresponding build errors also in cmake.

CMakeLists.txt

index dc5d60d677b92db4acd0913d1ad4b4564183838a..c18bb2d9c69ae3b57174d7e63cd208245c3b61bb 100644 (file)
@@ -271,7 +271,13 @@ if(MSVC)
 else()
     set(WARNINGS "sign-compare")
     set(WARNINGS_DISABLED "")
-    set(WARNINGS_ERRORS "")
+    set(WARNINGS_ERRORS
+        missing-prototypes
+        strict-prototypes
+        declaration-after-statement
+        implicit-function-declaration
+        undef
+    )
 endif()
 generate_warning_cflags(WARNINGS_CFLAGS "${WARNINGS}" "${WARNINGS_DISABLED}" "${WARNINGS_ERRORS}")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNINGS_CFLAGS}")