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 57ec7db
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 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,23 @@ 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)
{
if ! $(result)

This comment has been minimized.

Copy link
@grafikrobot

grafikrobot Oct 1, 2023

Member

You can use instead of the if: result ?= <cxxstd>11 ;

{
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 57ec7db

Please sign in to comment.