X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;h=bc148063047bab765a730b0832ac9fb4df41800c;hp=c88ba699b8916a1e4e2ebb254e19815fa291e503;hb=262295b3f5665dba8b154a4f82787bb52fef7b99;hpb=256586596e7b7fb27126d486e54b948accd07c59 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