[QBS] Preprocessor-build-rule for artifacts with input-dependantfileTags
Johannes.Matokic at microchip.com
Johannes.Matokic at microchip.com
Tue Jul 23 11:07:42 CEST 2013
I think I found a solution. I'll try to add one Artifact for each possible fileTag with a condition that filter all Artifacts except the one I need. As the preprocessor is part of the actual project I know what artifacts are required in the project.
This is not the ideal solution as it doesn't allow to move the preprocessor out into a different independent project but for the moment it will do its job.
> -----Ursprüngliche Nachricht-----
>
> 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
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
More information about the Qbs
mailing list