Skip to content

Commit

Permalink
Make toolset=clang-darwin default to cxxstd=11
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Oct 1, 2023
1 parent 43a3066 commit 84990e1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Jamroot
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ import "class" : new ;
import property-set ;
import threadapi-feature ;
import option ;
import property ;
# Backslash because of `bcp --namespace`
import tools/boost\_install/boost-install ;

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

rule clang-darwin-cxxstd-11 ( properties * )
{
# AppleClang defaults to C++03

local result = [ property.select <cxxstd> : $(properties) ] ;

if <toolset-clang:platform>darwin in $(properties)
{
result ?= <cxxstd>11 ;
}

return $(result) ;
}

all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ]
[ glob libs/*/build/Jamfile ] ] ;

Expand Down

0 comments on commit 84990e1

Please sign in to comment.