Enable more warnings in QMake-generated makefiles.

Use same warning levels for GCC than in original makefile. Use W4 level for Visual Studio.
This commit is contained in:
Kimmo Varis 2009-07-18 13:10:24 +03:00
parent 4622f9891c
commit 861774575d
1 changed files with 13 additions and 1 deletions

View File

@ -59,3 +59,15 @@ win32 {
HEADERS += resource.h
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
}