Skip to content

Commit fd7cbea

Browse files
committed
Make toolset=clang-darwin default to cxxstd=11
1 parent bda06e5 commit fd7cbea

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Jamroot

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ import "class" : new ;
140140
import property-set ;
141141
import threadapi-feature ;
142142
import option ;
143+
import property ;
143144
# Backslash because of `bcp --namespace`
144145
import tools/boost\_install/boost-install ;
145146

@@ -180,6 +181,7 @@ project boost
180181
# Used to encode variant in target name. See the 'tag' rule below.
181182
<tag>@$(__name__).tag
182183
<conditional>@handle-static-runtime
184+
<conditional>@clang-darwin-cxxstd-11
183185
# Comeau does not support shared lib
184186
<toolset>como:<link>static
185187
<toolset>como-linux:<define>_GNU_SOURCE=1
@@ -226,6 +228,20 @@ rule handle-static-runtime ( properties * )
226228
}
227229
}
228230

231+
rule clang-darwin-cxxstd-11 ( properties * )
232+
{
233+
# AppleClang defaults to C++03
234+
235+
local result = [ property.select <cxxstd> : $(properties) ] ;
236+
237+
if <toolset-clang:platform>darwin in $(properties)
238+
{
239+
result ?= <cxxstd>11 ;
240+
}
241+
242+
return $(result) ;
243+
}
244+
229245
all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ]
230246
[ glob libs/*/build/Jamfile ] ] ;
231247

0 commit comments

Comments
 (0)