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