qmake function str_member incorrectly parsed GCC version.
GCC 11 returned as GCC 1.
This commit is contained in:
parent
d1e6eb269d
commit
a4c484f821
11
common.pri
11
common.pri
|
@ -16,8 +16,9 @@ win32{
|
|||
unix{
|
||||
*g++* {
|
||||
GCC_VERSION = $$system("g++ -dumpfullversion -dumpversion")
|
||||
message("g++ version $$GCC_VERSION found")
|
||||
COMPILER_MAJOR_VERSION = $$str_member($${GCC_VERSION})
|
||||
GCC_VERSIONS = $$split(GCC_VERSION, ".")
|
||||
COMPILER_MAJOR_VERSION = $$member(GCC_VERSIONS, 0)
|
||||
message("g++ version $${COMPILER_MAJOR_VERSION}.x found")
|
||||
|
||||
greaterThan(COMPILER_MAJOR_VERSION, 3):CONFIG += g++4
|
||||
greaterThan(COMPILER_MAJOR_VERSION, 4):CONFIG += g++5
|
||||
|
@ -416,17 +417,13 @@ g++6:GCC_DEBUG_CXXFLAGS += \
|
|||
-Wmisleading-indentation
|
||||
|
||||
# Since GCC 7
|
||||
g++7{
|
||||
GCC_DEBUG_CXXFLAGS += \
|
||||
g++7:GCC_DEBUG_CXXFLAGS += \
|
||||
-Wduplicated-branches \
|
||||
-Wrestrict \
|
||||
-Walloc-zero \
|
||||
-Wnonnull \
|
||||
-Wno-stringop-overflow # cannot suppress warning in Qt headers
|
||||
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow # cannot suppress warning in Qt headers
|
||||
}
|
||||
|
||||
# Since GCC 8
|
||||
g++8:GCC_DEBUG_CXXFLAGS += \
|
||||
-Wmultistatement-macros \
|
||||
|
|
Loading…
Reference in New Issue
Block a user