From 861774575d6fe0b606450ebcd557fd2fe8311cc1 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sat, 18 Jul 2009 13:10:24 +0300 Subject: [PATCH] Enable more warnings in QMake-generated makefiles. Use same warning levels for GCC than in original makefile. Use W4 level for Visual Studio. --- src/src.pro | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/src.pro b/src/src.pro index 122286eaa..5b082e532 100644 --- a/src/src.pro +++ b/src/src.pro @@ -57,5 +57,17 @@ win32 { CONFIG += embed_manifest_exe console RC_FILE = cppcheck.rc HEADERS += resource.h - LIBS += -lshlwapi + LIBS += -lshlwapi +} + +# Add more strict compiling flags for GCC +# These flags are used in original (not generated by QMake) makefiles +contains(QMAKE_CXX, g++) { + QMAKE_CXXFLAGS_WARN_ON += -Wextra -pedantic +} + +# Change Visual Studio compiler (CL) warning level to W4 +contains(QMAKE_CXX, cl) { + QMAKE_CXXFLAGS_WARN_ON -= -W3 + QMAKE_CXXFLAGS_WARN_ON += -W4 }