summaryrefslogtreecommitdiffstats
path: root/subsurface-configure.pri
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-19 20:42:59 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-19 20:42:59 -0800
commita0b9daf63bfb0b5e7cd59806a9329382122dcac6 (patch)
tree364a507399387156b8282d18f1b9870b08bd44d6 /subsurface-configure.pri
parenta351bbde24d4a51a544f4d2056595475ff72e06a (diff)
downloadsubsurface-a0b9daf63bfb0b5e7cd59806a9329382122dcac6.tar.gz
Improve signing script, adjust flags for gcc-4.2
On one of my machines codesign doesn't find my signing key by hash, but does find it by name. Go figure. Also on that same system (32bit Mac Mini with running Snow Leopard / 10.6) gcc 4.2 doesn't support the -unused-result warning. So let's only turn that on for more modern versions of gcc Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-configure.pri')
-rw-r--r--subsurface-configure.pri11
1 files changed, 10 insertions, 1 deletions
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index 24bf08638..2a369da2b 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -10,7 +10,16 @@
# these warnings are in general just wrong and annoying - but should be
# turned on every once in a while in case they do show the occasional
# actual bug
-*-g++* | *-clang*: QMAKE_CFLAGS += -Wno-unused-result -Wno-pointer-sign -fno-strict-overflow
+# turns out the gcc 4.2 (as used on MacOS 10.6) doesn't have no-unused-result, yet
+*-clang*: QMAKE_CFLAGS += -Wno-unused-result -Wno-pointer-sign -fno-strict-overflow
+*-g++*: {
+ system( g++ --version | grep -e "4\\.2\\." > /dev/null ) {
+ QMAKE_CFLAGS += -Wno-pointer-sign -fno-strict-overflow
+ } else {
+ QMAKE_CFLAGS += -Wno-unused-result -Wno-pointer-sign -fno-strict-overflow
+ }
+}
+
*-clang*: QMAKE_CFLAGS += -Wno-format-security
*-g++*: QMAKE_CXXFLAGS += -fno-strict-overflow
!win32: !mac: {