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:
parent
4622f9891c
commit
861774575d
14
src/src.pro
14
src/src.pro
|
@ -57,5 +57,17 @@ win32 {
|
||||||
CONFIG += embed_manifest_exe console
|
CONFIG += embed_manifest_exe console
|
||||||
RC_FILE = cppcheck.rc
|
RC_FILE = cppcheck.rc
|
||||||
HEADERS += resource.h
|
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue