From: Jurko Gospodnetiæ (jurko.gospodnetic_at_[hidden])
Date: 2007-12-28 22:35:19
I ran into a problem attempting to get one of our builds cleaned up
using Boost Build.
Project needs to build two sets of files - one generated using a
toolset (e.g. msvc) and another generated using another one (e.g. a
quickbook). Is it possible to get such a project to build from a build
request (i.e. single command)?
Here's a more detailed example.
You have toolsets TA and TB. Toolset TA (think C++ compilers: msvc,
gcc, intel...) can generate files of type A and toolset TB (think tools
compiling internationalization messages, having nothing to do with what
C++ compiler is used) can generate files of type B. I would like to run
something like 'bjam TA TB' and get the following files built:
instead of getting an error that no viable generators have been found
for building target xxx.A with toolset TB or target yyy.B with toolset TA.
The only thing I can think of at the moment to achieve such an effect
is to split the project into two separate projects - one building xxx.A
and the other building yyy.B and then run their builds separately with
different toolsets. But if I attempt to do that then I will again not be
able to build both projects together from a shared master project.
Perhaps I could hardcode it in the project to always use TA and TB
for certain targets and ignore command-line options, but that would not
work well as I would like to use different toolsets TA# of the same type
for building xxx.A such as TA1, TA2, etc. and would not like the list of
possible TA# toolsets hardcoded.
Any ideas on how this should be handled?
This could possibly be related to ticket #4 on trac
I guess the semantics I'd like here would be: build everything you
can with all the toolsets I have given you, but do not complain if some
of the targets can not be built using some of the specified toolsets
(e.g attempting to generate documentation using a msvc toolset). It
should still report errors for any explicitly requested targets that can
not be built. If the current 'build all' semantics needs to be kept this
could possibly be implemented by using some kind of an 'or' separator on
the command-line between different toolsets telling Boost Build to build
targets with at least one of the toolset values.
Is there anything I'm missing that could go wrong if such semantics
Currently the project in question does this by not using an actual
toolset for TB but defining its generators without any toolset
requirements. That way Boost Build thinks targets built by 'TB' actually
get built by TA and places all the targets under TA folders. However,
this causes separate B targets to be built for each TA variation even
though B targets do not depend on any of those variations.
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