Skip to content

Instantly share code, notes, and snippets.

@mkrautz
Last active August 6, 2016 16:17
Show Gist options
  • Save mkrautz/c62c4509480c9808a0c615cd716310cd to your computer and use it in GitHub Desktop.
Save mkrautz/c62c4509480c9808a0c615cd716310cd to your computer and use it in GitHub Desktop.
--- compiler.pri
+++ compiler.pri
@@ -89,6 +89,15 @@ unix {
QMAKE_LFLAGS *= $(shell dpkg-buildflags --get LDFLAGS)
QMAKE_CFLAGS *= -Wfatal-errors -fvisibility=hidden
QMAKE_CXXFLAGS *= -Wfatal-errors -fvisibility=hidden
+
+ QMAKE_CXXFLAGS *= -std=c++11
+
+ # ZeroC Ice's C++11 libs are in /usr/lib/$triple/c++11 on Debian.
+ MULTIARCH_TRIPLE = $$system($${QMAKE_CXX} -print-multiarch)
+ !isEmpty(MULTIARCH_TRIPLE) {
+ QMAKE_LIBDIR *= /usr/lib/$${MULTIARCH_TRIPLE}/c++11
+ }
+
!CONFIG(quiet-build-log) {
QMAKE_CFLAGS *= -Wshadow -Wconversion -Wsign-compare
QMAKE_CXXFLAGS *= -Wshadow -Woverloaded-virtual -Wold-style-cast -Wconversion -Wsign-compare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment