Skip to content

Commit 879ae00

Browse files
committed
Fixed command-line toolset configuration.
The toolsets must be defined in project-config.jam in order to allow the toolset to be set on the command line. This change is less than ideal since the toolsets to test must be specified in two places, but it is worth doing because limiting the toolsets on the command line is extremely important.
1 parent 25d7712 commit 879ae00

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

Jamroot

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,25 @@
11
import os ;
22
import testing ;
33

4-
# configure a toolset and add it to the list of toolsets to test
5-
rule add-toolset ( name : version ? : path ? )
6-
{
7-
local versioned-name = $(name) ;
8-
if $(version)
9-
{
10-
versioned-name = $(name)-$(version) ;
11-
}
12-
13-
toolset-choices += $(versioned-name) ;
14-
using $(name) : $(version) : $(path) ;
15-
}
16-
174
# generate a list of toolsets to test
185
local toolset-choices = ;
196

207
# Default toolsets
218
if [ os.name ] = NT
229
{
23-
add-toolset msvc ;
10+
toolset-choices += msvc ;
2411
}
2512
else if [ os.name ] = CYGWIN
2613
{
27-
add-toolset gcc ;
14+
toolset-choices += gcc ;
2815
}
2916
else if [ os.name ] = LINUX
3017
{
31-
add-toolset gcc ;
18+
toolset-choices += gcc ;
3219
}
3320
else if [ os.name ] = MACOSX
3421
{
35-
add-toolset darwin ;
22+
toolset-choices += darwin ;
3623
}
3724

3825
echo "building for the following toolsets:" ;

project-config.jam

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os ;
2+
3+
# Default toolsets
4+
if [ os.name ] = NT
5+
{
6+
using msvc ;
7+
}
8+
else if [ os.name ] = CYGWIN
9+
{
10+
using gcc ;
11+
}
12+
else if [ os.name ] = LINUX
13+
{
14+
using gcc ;
15+
}
16+
else if [ os.name ] = MACOSX
17+
{
18+
using darwin ;
19+
}

0 commit comments

Comments
 (0)