[QBS] Preprocessor-build-rule for artifacts with input-dependant fileTags

Johannes.Matokic at microchip.com Johannes.Matokic at microchip.com
Tue Jul 23 10:52:25 CEST 2013


Hello,

Sorry for yet another question on build rules. As mentioned earlier I
have a custom preprocessor that I run on almost any file. So far I only
used source files and had therefore two almost identical rules producing
hpp- and cpp-artifacts. However this preprocessor is general purpose and
is used together with .h, .c, .cpp, .html, .txt and other files. Then
the generated artifacts sometimes have to be marked with different
fileTags as required by the products.

I didn't want to replicate the preprocessor rule that often and tried to
use a dynamic value for the fileTags-property of the artifact. However
it looks like the fileTags-property gets evaluated in a context that has
no inputs set. Which makes sense to decide which rules have to be
considered for the build at all.

Is there another way to create one rule for a general-purpose
preprocessor which outputs different artifact-types depending on the
input? Ideally without the need to list all possible artifacts.

Regards,

Johannes



More information about the Qbs mailing list