From a059cfcb3029b92d579b912d1c4d3509a81d9136 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 29 Jun 2011 16:22:14 +0100 Subject: cmake: Use -Wall and friends on GNU CC. --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9cc2a88..dbb33592 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,21 @@ if (X11_FOUND) endif () endif (X11_FOUND) +if (CMAKE_COMPILER_IS_GNUCC) + add_definitions( + -Wall + -Wpointer-arith + -Wstrict-prototypes + -Wmissing-prototypes + -Wmissing-declarations + -Wnested-externs + -fno-strict-aliasing + -Wbad-function-cast + #-Wold-style-definition + #-Wdeclaration-after-statement + ) +endif (CMAKE_COMPILER_IS_GNUCC) + if (WIN32) # Nobody likes to include windows.h: # - Microsoft's GL/gl.h header depends on windows.h but doesn't include it; -- cgit v1.2.3