From 9d7ed92f6e63cd2d1a1388874e54b37b5cfd01b7 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 2 Jan 2020 13:51:19 +0100 Subject: 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 --- qmake/generators/makefile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qmake/generators/makefile.cpp') 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; -- cgit v1.2.3