diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-06-29 16:22:14 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-06-29 16:22:14 +0100 |
commit | a059cfcb3029b92d579b912d1c4d3509a81d9136 (patch) | |
tree | 1d32eee0e2bd34d876d8180c5c742940447ccf53 | |
parent | 1074ec5b61f2bdb37e1dff94216661925577532d (diff) |
cmake: Use -Wall and friends on GNU CC.
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
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; |