|
Boost-Build : |
From: Jurko GospodnetiÄ (jurko.gospodnetic_at_[hidden])
Date: 2008-08-04 13:42:26
Hi Steven.
> Here's what I used to do:
>
> set environment for Visual Studio 2005 Express
> bjam --toolset=msvc-8.0
> set environment for Visual Studio 2008 Express
> bjam --toolset=msvc-9.0
>
> I know this is wrong, but it does work as expected.
I spent the whole last Sunday playing with this. I cleaned up the
msvc toolset a lot and corrected a few bugs but in the end still have
not managed to get a clear picture of what the 'correct' behaviour
should be.
On one hand:
> set environment for Visual Studio 2005 Express
> bjam toolset=msvc-8.0
> set environment for Visual Studio 2008 Express
> bjam toolset=msvc-9.0
Does work ok, but it also allows this:
> set environment for Visual Studio 2005 Express
> bjam toolset=msvc-9.0
Which will definitively cause confusion. :-)
When using toolset names/versions like
> bjam toolset=msvc-8.0
> bjam toolset=msvc-9.0
> bjam toolset=msvc-9.0express
it seems likely that we really want to use compilers with the
corresponding version, while in case of 'custom named' versions like:
> bjam toolset=xaxa
the point becomes much more moot.
A related problem is whether to report an error in case user
initializes one of the 'known' toolset versions but does so with a
compiler not corresponding to that version. Or ever more confusing -
initializes some toolset version with incompatible
compiler/linker/assembler/resurce-compiler/whatever versions. I
currently think we should simply use whatever settings user specifies
and go with them an check only those found in the environment, but only
for known toolset versions (i.e. those few hard-coded ones).
On whether to use the environment or not - my first idea was to not
allow using the environment except for one special version named
'environment'. I implemented this but looking at it now this seems too
restrictive. Perhaps someone would actually want to have two toolsets,
each initialized with different parameters but each locating some of its
tools using the environment.
The last design that 'seems right' to me would be to add a new
toolset initialization option <allow-path-search> (or
<allow-tool-search> or <environment> or something like that - ideas are
welcome) and make no toolset (except the default one used when user
requests 'the default one' and there are no auto-detected versions) use
the environment by default but instead use the environment only for
toolset versions initialized with this new setting set to true.
We could also make this setting more detailed, like 'allow
environment variable usage' & 'allow path usage' but that seems like
bike-shedding for now.
Any thoughts?
Best regards,
Jurko GospodnetiÄ
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