Boost logo

Boost-Build :

Subject: [Boost-build] IDL and Qt Generator Conflict
From: Brad Howes (howes_at_[hidden])
Date: 2008-11-14 09:52:27


All,

I'm working on a project that is attempting to use OpenDDS (from the
ACE/TAO team) along with Nokia's Qt. The build system works great so
far with just Qt. I created my own simplistic idl.jam tool that
invokes the two OpenDDS tools to generate the C++ files from an IDL
spec. For a file Foobar.idl, the first tool generates the following:

     FoobarTypeSupport.idl
     FoobarTypeSupportImpl.cpp
     FoobarTypeSupportImpl.h

One then runs another tool from ACE/TAO to generate C++ files from the
(now two) IDL files:

     FoobarTypeSupportC.cpp
     FoobarTypeSupportC.h
     FoobarTypeSupportC.inl
     FoobarTypeSupportS.cpp
     FoobarTypeSupportS.h
     FoobarTypeSupportS.inl

     FoobarC.cpp
     FoobarC.h
     FoobarC.inl
     FoobarS.cpp
     FoobarS.h
     FoobarS.inl

All of this works just great in Boost Build. The derived files are
created in the appropriate build variant directory. Here is my
generator line in the idl.jam file:

     type.register INL : inl : H ;
     generators.register-standard idl.OpenDDS-IDL : IDL :
CPP(%TypeSupportImpl) CPP(%TypeSupportC) CPP(%TypeSupportS)
          CPP(%C) CPP(%S) INL(%TypeSupportC) INL(%TypeSupportS)
INL(%C) INL(%S) ;

What I would like is to add the *.h files as well, using
H(%TypeSupportImpl), H(%TypeSupportC), etc. But when I do, I get a
Boost Build error complaining:

     Error: ambiguity found when searching for best transformation
     Trying to produce type 'CPP' from:
      - { Messenger.idl.IDL }
     Generators that succeeded:
      - qt4.moc
      - idl.OpenDDS-IDL
     First generator produced:
      - { qt4%qt4.moc-moc_MessengerC.cpp.CPP { idl%idl.OpenDDS-IDL-
MessengerC.h.H { Messenger.idl.IDL } } }
     Second generator produced:
      - { idl%idl.OpenDDS-IDL-MessengerTypeSupportC.cpp.CPP
{ Messenger.idl.IDL } }
     .
     .
     .

I certainly understand the ambiguity, though why does it happen when I
add "H(%C)" to the generator? Any ideas on how to coexist with another
generator that handles similar suffixes? For the record, my Qt stuff
does not use any IDL, so I could conceivably customize my qt4.jam file
and remove that part.

Finally, just a quick note of thanks to all who work on Boost Build. I
cannot imagine working on another project without it.

Thanks,

Brad

-- 
Brad Howes
Group 42
MIT Lincoln Laboratory • 244 Wood St. • Lexington, MA 02173
Phone: 781.981.5292 • Fax: 781.981.3495 • Secretary: 781.981.7420

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