Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.1
-
None
-
Windows, VS
-
3c1cb24fe4c0cde0cfe4b18f13fea4966ace8a41
Description
QMAKE_EXTRA_COMPILERs are not correctly generated in VS projects if the output name is generated by a function.
TEMPLATE = app FUNNY_COMPILER_FILES = foo.txt defineReplace(funnyCompilerOutputName) { name = $$absolute_path($$1, $$OUT_PWD) name = $$relative_path($$name, $$_PRO_FILE_PWD_) name = $$replace(name, \\.txt$, _txt) name = $${name}$${first(QMAKE_EXT_CPP)} name = $$replace(name,/,_) return($${name}) } funnycompiler.input = FUNNY_COMPILER_FILES funnycompiler.output = ${QMAKE_FUNC_FILE_IN_funnyCompilerOutputName} funnycompiler.commands = copy ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} funnycompiler.variable_out = GENERATED_SOURCES funnycompiler.dependency_type = TYPE_C QMAKE_EXTRA_COMPILERS += funnycompiler
In VcprojGenerator::initExtraCompilerOutputs() there's a call to hasBuiltinCompiler which checks if outputs have a known file extension such as ".cpp".
But the function sees the unevaluated string
"${QMAKE_FUNC_FILE_IN_funnyCompilerOutputName}"
and fails to recognize that the EXTRA_COMPILER generates C++ sources.
Attachments
For Gerrit Dashboard: QTBUG-45717 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
110905,4 | fix extra compilers with indirect outputs in VS projects | 5.5 | qt/qtbase | Status: MERGED | +2 | 0 |