Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-09-08 04:19:01


Hi Jürgen,

> > > > I've got a rudimentary set of Jamfiles for compiling Qt4 with V2.
> > > > It stills needs lots of improvements and is working on Linux only.
> > > > If anybody is interested, please drop me a note.
> > >
> > > I definitely would like to look at them. I have a hope to be able to
> > > build KDE4 with Boost.Build one day.
>
> Right, the environment is attached.
> unbzip2/tar in $QTDIR and call bjam on it ;-))
>
> Caveats:
> - requires .moc files from qmake build for inclusion by the corresponding
> .cpp file.

I'm working on making .cpp files moccable at the moment. My current syntax
looks like this:

exe main : main.cpp
[ cast _ moccable-cpp : main.cpp ]
/qt//qt ;

Where 'moccable-cpp' is a new type of files, needed to indicate that we want
to invoke moc on them, 'cast' is a new main target, and '_' essentially means
"I don't want to provide any name".

However, it looks that with moccable .cpp files you *have* to #include output
of moc.

1. If generated file does not #include original source file, it won't compile
because it does not see definitions of classes from .cpp file.
2. If generated file #includes original source file, you get multiple symbols.

So, you need to add #include "mocced_file.moc" to you .cpp file.

That's fine, but so far V2's Qt tool simply compiled the files generated by
moc, and did not require to #include the result. It will be inconsistent if
we require #include for moccing .cpp files, and don't require (and in fact
prohibit) #include for moccing .h files.

What will the users say if I change Qt support to always require #including
the output of moc?

- Volodya
  

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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