|
Boost-Build : |
Subject: Re: [Boost-build] Generating multiple CPP/H targets from a single source
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-08-04 17:04:24
Tyson Marchuk wrote:
> Thanks for the reply Volodya.
>
> I looked at the Generated headers section in the documentation, and I
> tried adding <implicit-dependency> to my Jamfile, but this doesn't seem
> to be solution. The generated files are in the same main target as the
> files that include them so according to the documentation this should be
> handled automatically.
>
> My Jamfile (names changed) is just:
> <code>
> exe testQtAndCodeGenerator
> :
> SourceForCodeGenerator.idl
> AQt4Dialog.ui
> AQt4DialogWrapper.h
> AQt4DialogWrapper.cxx
> AnotherQt4Class.h
> AnotherQt4Class.cxx
> main.cxx
> /qt4//QtCore
> /qt4//QtGui
> /codeGenerator//codeGenerator
> : <include>.
> ;
>
> install bindir : testQtAndCodeGenerator : <location>../bin ;
> </code>
>
> Note above that the code generator will turn SourceForCodeGenerator.idl
> into:
> SourceForCodeGenerator.h
> SourceForCodeGeneratorPlugin.h
> SourceForCodeGeneratorSupport.h
> SourceForCodeGenerator.cpp
> SourceForCodeGeneratorPlugin.cpp
> SourceForCodeGeneratorSupport.cpp
>
> These headers will be included in the other source files in the project.
>
> Maybe this feature was added in a later version of Boost.Build? I'm
> using milestone 10.
You really should try a later version, then -- nightly built preferably.
Detection of dependencies from .cpp file to a generated header is something
that original jam lacked, and was implemented in Boost.Jam; but I don't
remember when exactly.
- Volodya
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