From 0b144bc76a368ecc6c5c1121a1b51e888a0621ac Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 9 Dec 2013 10:56:31 -0800 Subject: 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 --- qmake/generators/unix/unixmake2.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'qmake/generators/unix/unixmake2.cpp') 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; } } -- cgit v1.2.3