Boost logo

Boost-Build :

From: Klaus Nowikow (e8827661_at_[hidden])
Date: 2006-08-07 03:13:12


Vladimir Prus wrote:
> > [...]
> > > > There is only one problem: when used with the MSVC toolset it
> > > > clashes with midl.jam, because msvc.jam imports midl.jam.
> > > > Both midl and xpidl register a new type IDL, and both add a
> > > > generator to create other files from an *.idl file. I can't
> > > > think of any solution to that besides not importing midl.jam
> > > > from msvc.jam. Any ideas?
> > >
> > > Add a new file in tools/types directory, and remove declarationof IDL
> > > type from your module and midl.jam.
> >
> > That's a start, but it solves only the first half of the problem.
> > There are siill two generators that generate IDL -> OBJ, see the output
> > of 'bjam -n' below. I used my own project to test it, which is too large
> > to show here, but I can provide a minimal test case if you need one.
> >
> > I have to mention here that the xpidl generator produces a dummy C
> > file which is never used -- I just 'touch $(<[4]:W)' to produce it.
>
> I recall we have such problem, I think that qt4.jam has some solution
> for a related problem, but I forgot lots of things in last few days ;-)

Yes, the magic of vacations :-)
I'll take a look at qt4.jam, thanks.

> > This is to make sure that the generated files go into the dependencies
> > -- a little clumsy, but I couldn't figure out another way to achieve
> > that. The generator in my original post generated a dummy CPP file,
> > but I changed that so that the error messages are clearer.
> >
> > # bjam -n output:
> [...]
>
> Recall me, what is the real type that you need to produce from IDL. In

H (.h), JAVA (.java), and XPTYPELIB (.xpt)

I wonder if it would be better to provide three different generators for
the three target types instead of one that creates all three.

> any case, if you have some "IDL file" in source of a main target, V2 has
> to decide which generator to use. There are two approaches:
>
> - Add new <idl_toolset> property. I think we've discussed this with
> Reece and Andrey, but did not agree if that's a good
> idea or not. IIRC, one concern was that it does not scale as we
> add more and more tools. But this approach can still
> work in you case.
>
> - Use different type for sources to MSIDL and XPIDL. You can either
> use different extension (which is ugly), or
> use the 'cast' rule to explicitly say which type a given source has.

Didn't know about the cast rule. I'll try it.

--
Klaus

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk