summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/mingw_make.cpp
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/win32/mingw_make.cpp
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/win32/mingw_make.cpp')
-rw-r--r--qmake/generators/win32/mingw_make.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 1aeaef1d23..6d5764f59c 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -321,12 +321,18 @@ void MingwMakefileGenerator::writeIncPart(QTextStream &t)
t << "-I" << pwd << " ";
}
+ QString isystem = var("QMAKE_CFLAGS_ISYSTEM");
const ProStringList &incs = project->values("INCLUDEPATH");
for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
QString inc = (*incit).toQString();
inc.replace(QRegExp("\\\\$"), "");
inc.replace(QRegExp("\""), "");
- t << "-I" << quote << inc << quote << " ";
+
+ if (!isystem.isEmpty() && isSystemInclude(inc))
+ t << isystem << ' ';
+ else
+ t << "-I";
+ t << quote << inc << quote << " ";
}
t << "-I" << quote << specdir() << quote
<< endl;