New warning keys since GCC 7.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-03-23 10:36:11 +02:00
parent d696af9a33
commit 50a5119960
2 changed files with 22 additions and 10 deletions

View File

@ -16,6 +16,10 @@ count(LIST, 1, >): error("The build will fail. Path '$${OUT_PWD}' contains space
unix {
*-g++ {
GCC_VERSION = $$system("g++ -dumpversion")
contains(GCC_VERSION, 7.[0-9]) {
message( "g++ version 7.x found" )
CONFIG += g++7
} else {
contains(GCC_VERSION, 6.[0-9]) {
message( "g++ version 6.x found" )
CONFIG += g++6
@ -34,6 +38,7 @@ unix {
}
}
}
}
TEMPLATE = subdirs
SUBDIRS = src

View File

@ -283,6 +283,13 @@ g++6:GCC_DEBUG_CXXFLAGS += \
-Wduplicated-cond \
-Wmisleading-indentation
# Since GCC 7
g++7:GCC_DEBUG_CXXFLAGS += \
-Wduplicated-branches \
-Wrestrict \
-Walloc-zero \
-Wnonnull
# Usefull Clang warnings keys.
CLANG_DEBUG_CXXFLAGS += \
-O0 \ # Turn off oprimization.