From 2dcfaf7bee9e74546b96481554ba06d5dcb29cfa Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 30 Jan 2019 13:44:54 +0100 Subject: qmake/vcxproj generator: Fix bug in extra compiler initialization QMake ignored every extra compiler that sets variable_out and whose output does not have a builtin compiler (C++, C). What the code wants to achieve is to ignore extra compilers that put their output into variables that are handled "somewhere else already", e.g. are in the otherFilters list. Evidence for that is to be found in the addOnInput == true if branch. Task-number: QTBUG-71283 Change-Id: I8c1d76febccacb450cd14ad7a1f4b87726832312 Reviewed-by: Brett Stottlemyer Reviewed-by: Edward Welbourne Reviewed-by: Oliver Wolff --- qmake/generators/win32/msvc_vcproj.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 95c16661e7..a81e540e1f 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1541,14 +1541,14 @@ void VcprojGenerator::initExtraCompilerOutputs() extraCompile.Filter = ""; extraCompile.Guid = QString(_GUIDExtraCompilerFiles) + "-" + (*it); - // If the extra compiler has a variable_out set the output file - // is added to an other file list, and does not need its own.. bool addOnInput = hasBuiltinCompiler(firstExpandedOutputFileName(*it)); - const ProString &tmp_other_out = project->first(ProKey(*it + ".variable_out")); - if (!tmp_other_out.isEmpty() && !addOnInput) - continue; - if (!addOnInput) { + // If the extra compiler has a variable_out set that is already handled + // some other place, ignore it. + const ProString &outputVar = project->first(ProKey(*it + ".variable_out")); + if (!outputVar.isEmpty() && otherFilters.contains(outputVar)) + continue; + QString tmp_out = project->first(ProKey(*it + ".output")).toQString(); if (project->values(ProKey(*it + ".CONFIG")).indexOf("combine") != -1) { // Combined output, only one file result -- cgit v1.2.3