Skip to content

Commit

Permalink
Update global.pri
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Feb 11, 2020
1 parent 4fae15d commit 90807fe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions global.pri
Expand Up @@ -207,6 +207,24 @@ unix:LIBS += $$QMAKE_LIBS_DYNLOAD
}
}

# from https://github.com/qt/qtbase/blob/dev/mkspecs/features/qt_common.prf
# and https://patchwork.ozlabs.org/patch/1009009/#2048261
gcc:!intel_icc {
QMAKE_CXXFLAGS_WARN_ON += -Wvla
# GCC 5 fixed -Wmissing-field-initializers for when there are no initializers
lessThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wno-missing-field-initializers
# GCC 5 introduced -Wdate-time
greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
# GCC 6 introduced these
greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
# GCC 7 has a lot of false positives relating to this, so disable completely
greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow
# GCC 9 introduced -Wformat-overflow in -Wall, but it is buggy:
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow
# GCC 9 has a lot of false positives relating to this, so disable completely
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy
}

openmp {
QMAKE_CXXFLAGS += -fopenmp
QMAKE_CFLAGS += -fopenmp
Expand Down

0 comments on commit 90807fe

Please sign in to comment.