Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2005-08-05 10:19:41


Alexey Pakhunov <alexeypa_at_[hidden]> writes:

> AFAIU currently a toolset is normally configured in site/user-config.jam:
>
> import toolset : using ;
> import msvc ;
^^^^^^^^^^^
You don't need that line; "using" will do the import.

> using msvc ;
>
> A user or site administrator may configure several toolset configurations:
>
> using msvc ;
> using msvc : 7.1 ;
> using msvc : 8.0 : "C:\\Program Files\\Microsoft Visual Studio
> 8\\VC\\bin\\cl.exe" ;
>
> It is also possible to use autoconfiguration:
>
> import msvc-config ; # existing way
> import msvc ; # msvc will configure itself in near future
>
>
> --- the problem ---
>
> There are several things that are questionable.
>
> 1. A user can configure versions other than 6.0, 7.0, 7.1 or 8.0. This
> can break setting some version-dependent compiler flags like
> /Zc:forScope, /Ogiy, /Ot, /Os and others.

Version-dependent compiler flags should be set in a way that's
impervious to the difference between 6.0 and 6.5. After all, a user
may be testing against several service packs.

> I believe in the future number of such incompatibilities will grow.
>
> 2. A user can configure "questionable" configurations:
>
> using msvc : 8.0 : "C:\\Program Files\\Microsoft Visual
> Studio\\VC98\\bin\\cl.exe" ;

Takes a lot of effort to mess up that way. I wouldn't worry about
it. Most people will just

using msvc ;

which will eventually have the semantics of "import msvc-config."

> --- the solution ---
>
> The toolset can detect available configurations and configure
> them. You can see a prototype of this code in msvc-config file in
> the "amd64, ia64 patch I posted here". Again, this code will be
> moved to msvc.jam itself.

Agreed.

> A user will use "using msvc ;" syntax to select configurations he or
> she wants to use.
>
> Consequences of such a design are:
>
> - A user will have to use one of allowed versions or a default one:
>
> using msvc ; # allowed, a default version will be used
> using msvc : 7.1 ; # allowed
> using msvc : 7.5 ; # not allowed

I'm not sure we want to disallow it. I don't think every user ought
to have to update his BBv2 installation just to support a new version
of an existing compiler. Also, users might want to do things like

using msvc : 7.1-hotfix-9906761 : ...whatever... ;

> - A user may pass config command, but it should be aligned in the
> version selected:

> # allowed, 6.0 will be selected
> using msvc : : "C:\\Program Files\\Microsoft Visual
> Studio\\VC98\\bin\\cl.exe" ;
>
> # allowed
> using msvc : 8.0 : "C:\\Program Files\\Microsoft Visual Studio
> 8\\VC\\bin\\cl.exe"
>
> # allowed, even if it wasn't detected automatically
> using msvc : 7.1 : "D:\\Xxx\\Visual C++ Toolkit 2003\\bin\\cl.exe"
>
> # forbidden
> using msvc : 7.1 : "C:\\Program Files\\Microsoft Visual Studio
> 8\\VC\\bin\\cl.exe"
>
>
> Opinions?

Much too restrictive. If a user is going to go to the trouble to
write out the path to the compiler explicitly, she can be expected to
get it right.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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