Boost logo

Boost-Build :

From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2005-08-05 04:48:11


Hi,

To Vladimir Prus, Andrey Melnikov and others: please, comment this message.

Alexey Pakhunov wrote:
> I'll better open a new thread where we will be able to discuss the way
> initialization/autodetection code should be written.

There are several things unclear to me regarding toolset initialization
code. I will use the msvc toolset in my examples because I'm not fluent
in other toolsets.

--- some background ---

AFAIU currently a toolset is normally configured in site/user-config.jam:

import toolset : using ;
import msvc ;
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. 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" ;

--- 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.

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

- 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?

Best regards/Venlig hilsen,
Alexey Pakhunov.

 


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