summaryrefslogtreecommitdiffstats
path: root/qmake/generators/unix/unixmake2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/unix/unixmake2.cpp')
-rw-r--r--qmake/generators/unix/unixmake2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 8e18f69c03..eb68614fe6 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1229,8 +1229,10 @@ void UnixMakefileGenerator::init2()
}
if (include_deps && project->isActiveConfig("gcc_MD_depends")) {
- project->values("QMAKE_CFLAGS") += "-MD";
- project->values("QMAKE_CXXFLAGS") += "-MD";
+ // use -MMD if we know about -isystem too
+ ProString MD_flag(project->values("QMAKE_CFLAGS_ISYSTEM").isEmpty() ? "-MD" : "-MMD");
+ project->values("QMAKE_CFLAGS") += MD_flag;
+ project->values("QMAKE_CXXFLAGS") += MD_flag;
}
if(!project->isEmpty("QMAKE_BUNDLE")) {