When using qmake to generate a vcxproj file, and the .pro file uses a custom compiler (as specified in QMAKE_EXTRA_COMPILERS), input files used by that extra compiler are not added to the project, and of course neither are commands associated with them.
Explicitly adding them to SOURCES works around that (but breaks makefile generation).
The problem appears to be in VCXProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool) in msbuild_objectmodel.cpp . It sets up
tempProj.SingleProjects += tool;
and later iterates over tempProj.ExtraCompilers - but it never actually initializes tempProj.ExtraCompilers, they are always empty. Adding these lines (stolen from VCProjectWriter::write in msvc_objectmodel.cpp) seems to fix it:
The problem is reproducible in a single-configuration build, but not in multi-configuration one. Test case:
|For Gerrit Dashboard: QTBUG-69769|
|236216,4||qmake vcxproj generator: Fix extra compilers for single configs||5.11||qt/qtbase||Status: MERGED||+2||0|