From a9e135fa8892621fafe24435d567e938fc3d3f02 Mon Sep 17 00:00:00 2001 From: Jeff Norman Date: Wed, 27 Apr 2022 13:49:40 -0400 Subject: [PATCH] Updated compiler branches to work with big sur + big sur + now reads compiler branches correctly added -Wno-error for deprecated-copy for qt 5.12 --- oscar/oscar.pro | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/oscar/oscar.pro b/oscar/oscar.pro index ff48ecb9..860d38a3 100644 --- a/oscar/oscar.pro +++ b/oscar/oscar.pro @@ -527,7 +527,6 @@ message("CXXFLAGS pre-mods $$QMAKE_CXXFLAGS ") QMAKE_CFLAGS += -Werror QMAKE_CXXFLAGS += -Werror - gcc | clang { COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion") COMPILER_MAJOR = $$split(COMPILER_VERSION, ".") @@ -536,25 +535,28 @@ gcc | clang { message("$$QMAKE_CXX major version $$COMPILER_MAJOR") } -## equals($$QMAKE_CXX, "gcc") : { // guess what! the name is really "g++" -equals(QMAKE_CXX, g++) { - message("Detected compiler g++") +gcc:!clang { + message("Building for $$QMAKE_HOST.os") greaterThan(COMPILER_MAJOR, 10) : { QMAKE_CFLAGS += -Wno-error=stringop-overread QMAKE_CXXFLAGS += -Wno-error=stringop-overread message("Making stringop-overread a non-error") } } -equals(QMAKE_CXX, clang++) { - message("Detected compiler clang++") -} +clang { + message("Building for $$QMAKE_HOST.os") + QMAKE_CFLAGS_WARN_ON += -Wno-error=deprecated-copy + QMAKE_CXXFLAGS_WARN_ON += -Wno-error=deprecated-copy + message("Making deprecated-copy a non-error") +} # Make deprecation warnings just warnings QMAKE_CFLAGS += -Wno-error=deprecated-declarations QMAKE_CXXFLAGS += -Wno-error=deprecated-declarations message("CXXFLAGS post-mods $$QMAKE_CXXFLAGS ") +message("CXXFLAGS_WARN_ON $$QMAKE_CXXFLAGS_WARN_ON") lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) { QMAKE_CFLAGS += -Wno-error=strict-aliasing