From: Manuel Nickschas Date: Sun, 15 Jun 2008 00:29:36 +0000 (+0200) Subject: Enable warnings on gcc X-Git-Tag: 0.3.0~371^2~1 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=262295b3f5665dba8b154a4f82787bb52fef7b99 Enable warnings on gcc --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c88ba699..bc148063 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,21 @@ if(STATICWIN) set(CMAKE_BUILD_TYPE Release) endif(STATICWIN) +# Enable various flags on gcc +include(CheckCXXCompilerFlag) +check_cxx_compiler_flag(-Wall Wall) +if(Wall) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +endif(Wall) +check_cxx_compiler_flag(-Wextra Wextra) +if(Wextra) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") +endif(Wextra) +check_cxx_compiler_flag(-ansi ansi) +if(ansi) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi") +endif(ansi) + set(QT_MIN_VERSION "4.4.0") # By default, we build all binaries