Make sure we build with -std=c++98 (under Unix and Qt4)
authorgregor herrmann <gregor@toastfreeware.priv.at>
Mon, 2 Oct 2017 20:51:42 +0000 (22:51 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Mon, 2 Oct 2017 20:51:42 +0000 (22:51 +0200)
because gcc 4.2.1 on Maemo5 doesn't know c++11, and with this setting we can
prevent accidents also when building the Qt4 variant with a modern compiler.

src/global.pri

index 5ab629a..27e6914 100644 (file)
@@ -24,3 +24,12 @@ contains( DISTRO, [Ii]nternet ) {
     }
 }
 
+# gcc 4.2.1 on Maemo doesn't understand anything newer then c++98.
+# make sure we explicitly add the flag even when building
+# with a modern compiler.
+# Only under Qt4 because Qt5 needs c++11
+unix: {
+    equals( QT_MAJOR_VERSION, 4 ) {
+        QMAKE_CXXFLAGS += -std=c++98
+    }
+}