path: root/qmake/generators/makefile.cpp
diff options
authorJoerg Bornemann <>2020-01-02 13:51:19 +0100
committerJoerg Bornemann <>2020-01-07 07:16:59 +0100
commit9d7ed92f6e63cd2d1a1388874e54b37b5cfd01b7 (patch)
treec9c298693b83e124b1c0614ba182f880cba40ae6 /qmake/generators/makefile.cpp
parent1535fc9fb9ddbfce1680979c0634b4fdf8d75fca (diff)
Fix dependency resolution for extra compilers in VS projects
De-duplicate the code that calls the extra compiler's depend_command by using the central function callExtraCompilerDependCommand. This one actually tries to resolve dependencies unlike the removed code that blindly resolved relative paths to the build directory. This fixes dependencies reported by uic which need to be resolved against what is in DEPENDPATH. Fixes: QTBUG-80579 Change-Id: If482e50ff3eff716fefffee82004acc076b3a547 Reviewed-by: Kai Koehne <>
Diffstat (limited to 'qmake/generators/makefile.cpp')
1 files changed, 4 insertions, 1 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index ed7d057a88..dcb44239a0 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1857,10 +1857,13 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom
const QString &tmp_out,
bool dep_lines,
QStringList *deps,
- bool existingDepsOnly)
+ bool existingDepsOnly,
+ bool checkCommandAvailability)
char buff[256];
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell);
+ if (checkCommandAvailability && !canExecute(dep_cmd))
+ return;
dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
QByteArray depData;