Boost logo

Boost-Build :

From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2005-09-27 14:15:15


Hi,

The patch fixes condition generation: when 'default' version is selected
and the list of detected configurations is not empty a condition with
version (<toolset>msvc-version) should be generated.

Also the comment for the 'init' rule was updated.

Alexey Pakhunov wrote:
> But I noticed another problem: the condition is wrong when 'default' is
> passed and the list of detected versions is not empty. It will be
> '<toolset>msvc' while it should be '<toolset>msvc-version'. Otherwise it
> won't be possible to do this:
>
> using msvc : default ;
> using msvc : 7.1 ; // will fail in 'common.check-init-parameters'
>
> I will send the fix shortly.

Best regards/Venlig hilsen,
Alexey Pakhunov.
 --------------030103050104040102070704 Content-Type: text/plain;
name="msvc.jam.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="msvc.jam.diff"

Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.56
diff -u -r1.56 msvc.jam
--- msvc.jam 26 Sep 2005 06:02:41 -0000 1.56
+++ msvc.jam 27 Sep 2005 18:56:47 -0000
@@ -1,5 +1,6 @@
-# Copyright 2003 David Abrahams.
-# Copyright 2005 Vladimir Prus.
+# Copyright (c) 2003 David Abrahams.
+# Copyright (c) 2005 Vladimir Prus.
+# Copyright (c) 2005 Alexey Pakhunov.
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
@@ -40,22 +41,34 @@

# Initialize the toolset for a specific version. As the result, path to
# compiler and, possible, program names are set up, and will be used when
-# that version of compiler is requested. For example, you might have::
+# that version of compiler is requested. For example, you might have:
#
-# using msvc : 6.5 : X:/some_dir ;
-# using msvc : 7.0 : Y:/some_dir ;
-# using msvc : : Z:/some_dir
-#
-# If you have "msvc-6.5" in build request, the version from X: drive will be used,
-# and if you put only "msvc", then drive "Z:" will be used. Note that it's not possible
-# the specify that by default, version 7.0 must be used --- you should use 'using'
-# without version number for that effect.
-#
-# version --
-# path --
+# using msvc : 6.5 : cl.exe ;
+# using msvc : 7.0 : Y:/foo/bar/cl.exe ;
#
-# When invoking tools, we'll first run vcvars32.bat from the configured path and
-# then cl/link, without path.
+# The version paramater can be ommited:
+#
+# using msvc : : Z:/foo/bar/cl.exe ;
+#
+# Two special version keywords may be supplied:
+# - all - all detected versions will be registered;
+# - default - this is an equivalent to an empty version.
+#
+# Depending on a supplied version, detected configurations and presence
+# 'cl.exe' in the path different results may be achieved. The following
+# table describes all possible cases:
+#
+# Nothing "x.y"
+# Passed Nothing "x.y" detected, detected,
+# version detected detected cl.exe in path cl.exe in path
+#
+# default Error Use "x.y" Create "default" Use "x.y"
+# all None Use all None Use all
+# x.y - Use "x.y" - Use "x.y"
+# a.b Error Error Create "a.b" Create "a.b"
+#
+# "x.y" - refers to a detected version;
+# "a.b" - refers to an undetected version.
#
# Note: for free VC7.1 tools, we don't correctly find vcvars32.bar when user
# explicitly provides a path.
@@ -118,20 +131,18 @@
options *
)
{
- # If no version supplied use the default configuration. Note that condition
- # remains versionless.
- local v = $(version) ;
- if ! $(v)
+ if ! $(version)
{
- # take the first detected version
+ # No version is given. Use the newest detected version if any.
version = [ $(.versions).all ] ;
version = $(version[1]) ;
-
- # Note: 'version' can still be empty at this point if no versions were
- # detected.
- version ?= "default" ;
}

+ # Note: 'version' can still be empty at this point if no versions were
+ # detected. In this case the condition remains versionless.
+ local v = $(version) ;
+ version ?= "default" ;
+
# Check whether selected configuration is used already
if $(version) in [ $(.versions).used ]
{
 --------------030103050104040102070704--


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