From 956aac65d49c36d27c5c7b1c569bb6c2571ae584 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 11 Nov 2021 13:24:06 +0100 Subject: cmake: take over some fatal warnings from autotools Adopt various fatal warnings from the autotools build system to see corresponding build errors also in cmake. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index dc5d60d6..c18bb2d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") -- cgit v1.2.1