[QBS] How to reuse the results of Rule execution?

NIkolai Marchenko enmarantispam at gmail.com
Fri Sep 9 10:42:09 CEST 2016


Suppose I have a rule that generates .cpp files from .proto files. These
generated files are needed to be plugged in into different products in a
project.

When I define stuff like that in one of the products:

Group

{

    condition: conditionals.grpc == true

    name: "proto"

    files: [

        "Interfaces/Auth/service.proto"

    ]

    fileTags: ["proto", "grpc"]

}


these files are built OK, but then I need to EXPLICITLY mention
generated results

in all of the other products that need the service.grpc.pb.cc file because

only this exact (generating) product gets the artifact auto plugged
in. Is there a way

to tell another product that it needs to pick the results of this generation?


If I try to re-generate by pluggingg the group above into a second
product I get a conflict

"Conflicting artifacts for file path"

and if I mesh a product name into generated folder structure I get an
ugly mess in

my header includes.


Any way to just reuse the results of generation without explicitly
mentioning each file?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20160909/d032e871/attachment.html>


More information about the Qbs mailing list