diff --git a/oscar/oscar.pro b/oscar/oscar.pro index 9e5977a4..2d88dd0a 100644 --- a/oscar/oscar.pro +++ b/oscar/oscar.pro @@ -521,6 +521,7 @@ DISTFILES += help/default.css \ help/index.qhcp } +message("CXXFLAGS pre-mods $$QMAKE_CXXFLAGS ") # Always treat warnings as errors, even (especially!) in release QMAKE_CFLAGS += -Werror @@ -533,22 +534,28 @@ gcc | clang { COMPILER_MAJOR = $$first(COMPILER_MAJOR) message("$$QMAKE_CXX major version $$COMPILER_MAJOR") - -## equals($$QMAKE_CXX, "gcc") : { // guwess what! the name is really "g++" - gcc { - greaterThan(COMPILER_MAJOR, 10) : { - QMAKE_CFLAGS += -Wno-error=stringop-overread - QMAKE_CXXFLAGS += -Wno-error=stringop-overread - message("Removing stringop-overread error") - } - } - } +## equals($$QMAKE_CXX, "gcc") : { // guess what! the name is really "g++" +gcc { + message("Detected compiler type gcc") + greaterThan(COMPILER_MAJOR, 10) : { + QMAKE_CFLAGS += -Wno-error=stringop-overread + QMAKE_CXXFLAGS += -Wno-error=stringop-overread + message("Making stringop-overread a non-error") + } +} +clang { + message("Detected comiler type clang") +} + + # Make deprecation warnings just warnings QMAKE_CFLAGS += -Wno-error=deprecated-declarations QMAKE_CXXFLAGS += -Wno-error=deprecated-declarations +message("CXXFLAGS post-mods $$QMAKE_CXXFLAGS ") + lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) { QMAKE_CFLAGS += -Wno-error=strict-aliasing QMAKE_CXXFLAGS += -Wno-error=strict-aliasing