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 {
|
unix {
|
||||||
*-g++ {
|
*-g++ {
|
||||||
GCC_VERSION = $$system("g++ -dumpversion")
|
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]) {
|
contains(GCC_VERSION, 6.[0-9]) {
|
||||||
message( "g++ version 6.x found" )
|
message( "g++ version 6.x found" )
|
||||||
CONFIG += g++6
|
CONFIG += g++6
|
||||||
|
@ -33,6 +37,7 @@ unix {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
|
@ -283,6 +283,13 @@ g++6:GCC_DEBUG_CXXFLAGS += \
|
||||||
-Wduplicated-cond \
|
-Wduplicated-cond \
|
||||||
-Wmisleading-indentation
|
-Wmisleading-indentation
|
||||||
|
|
||||||
|
# Since GCC 7
|
||||||
|
g++7:GCC_DEBUG_CXXFLAGS += \
|
||||||
|
-Wduplicated-branches \
|
||||||
|
-Wrestrict \
|
||||||
|
-Walloc-zero \
|
||||||
|
-Wnonnull
|
||||||
|
|
||||||
# Usefull Clang warnings keys.
|
# Usefull Clang warnings keys.
|
||||||
CLANG_DEBUG_CXXFLAGS += \
|
CLANG_DEBUG_CXXFLAGS += \
|
||||||
-O0 \ # Turn off oprimization.
|
-O0 \ # Turn off oprimization.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user