From 84990e1a734874097ae62aa2f3cc39b722dc7323 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 1 Oct 2023 18:15:56 +0300 Subject: [PATCH] Make toolset=clang-darwin default to cxxstd=11 --- Jamroot | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Jamroot b/Jamroot index bbe6291106..33a31db19b 100644 --- a/Jamroot +++ b/Jamroot @@ -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 ; @@ -180,6 +181,7 @@ project boost # Used to encode variant in target name. See the 'tag' rule below. @$(__name__).tag @handle-static-runtime + @clang-darwin-cxxstd-11 # Comeau does not support shared lib como:static como-linux:_GNU_SOURCE=1 @@ -226,6 +228,20 @@ rule handle-static-runtime ( properties * ) } } +rule clang-darwin-cxxstd-11 ( properties * ) +{ + # AppleClang defaults to C++03 + + local result = [ property.select : $(properties) ] ; + + if darwin in $(properties) + { + result ?= 11 ; + } + + return $(result) ; +} + all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ] [ glob libs/*/build/Jamfile ] ] ;