New warning keys since GCC 7.
--HG-- branch : develop
This commit is contained in:
parent
d696af9a33
commit
50a5119960
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user