Generator with specific types

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Generator with specific types

Boost - Build mailing list
Hi,

I have a generator which generates from xml to header C++ files. But,
I'd like to avoid creating a generic XML -> HPP generator, because
that is way too broad and could conflict with other generators.

So, I created a type.register WAYLAND_XML : : XML ; type and a
generator of the type:

generators.register-standard wayland-generator.generate : WAYLAND_XML : HPP ;

However, I don't know how to say, when instancing a typed-target,
explicitly which types are my sources.

Also, how do I get the path to a built executable so I can use it in
the generation action?

Kind regards,
--
Felipe Magno de Almeida
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Generator with specific types

Boost - Build mailing list
AMDG

On 8/21/19 8:39 PM, Felipe Magno de Almeida via Boost-build wrote:

>
> I have a generator which generates from xml to header C++ files. But,
> I'd like to avoid creating a generic XML -> HPP generator, because
> that is way too broad and could conflict with other generators.
>
> So, I created a type.register WAYLAND_XML : : XML ; type and a
> generator of the type:
>
> generators.register-standard wayland-generator.generate : WAYLAND_XML : HPP ;
>
> However, I don't know how to say, when instancing a typed-target,
> explicitly which types are my sources.
>

Use the cast rule (only works for sources, not generated files).

> Also, how do I get the path to a built executable so I can use it in
> the generation action?
>

Pass it along as a dependency property.  See quickbook for
an example.

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build