summaryrefslogtreecommitdiffstats
path: root/qmake/generators/unix
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-12-09 10:56:31 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-20 02:42:31 +0100
commit0b144bc76a368ecc6c5c1121a1b51e888a0621ac (patch)
tree7e461a57e9170fb39b935923e227abfff3af583a /qmake/generators/unix
parent6f7d370adec3054656f36b0d2a0777a8a1df3602 (diff)
Add support for using -isystem in qmake
This commit will make qmake use -isystem automatically for any compilers that declare support for it for any paths that are listed in QMAKE_DEFAULT_INCDIRS. Change-Id: I36fefc6d5bba61671f65669f0ea42704b3c3cf31 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r--qmake/generators/unix/unixmake2.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 1444161ca9..8e18f69c03 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -125,10 +125,16 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << " -I" << pwd;
}
{
+ QString isystem = var("QMAKE_CFLAGS_ISYSTEM");
const ProStringList &incs = project->values("INCLUDEPATH");
for(int i = 0; i < incs.size(); ++i) {
ProString inc = escapeFilePath(incs.at(i));
- if(!inc.isEmpty())
+ if (inc.isEmpty())
+ continue;
+
+ if (!isystem.isEmpty() && isSystemInclude(inc.toQString()))
+ t << ' ' << isystem << ' ' << inc;
+ else
t << " -I" << inc;
}
}