/
usr
/
share
/
boost-build
/
src
/
tools
/
features
/
/usr/share/boost-build/src/tools/features
mkdir
upload
Name
Size
Mode
Actions
address-model-feature.jam
695
0644
edit
dl
rm
allow-feature.jam
512
0644
edit
dl
rm
architecture-feature.jam
1222
0644
edit
dl
rm
archiveflags-feature.jam
447
0644
edit
dl
rm
asmflags-feature.jam
400
0644
edit
dl
rm
build-feature.jam
626
0644
edit
dl
rm
cflags-feature.jam
691
0644
edit
dl
rm
conditional-feature.jam
728
0644
edit
dl
rm
coverage-feature.jam
609
0644
edit
dl
rm
cxx-template-depth-feature.jam
1427
0644
edit
dl
rm
cxxabi-feature.jam
407
0644
edit
dl
rm
cxxflags-feature.jam
374
0644
edit
dl
rm
cxxstd-feature.jam
1667
0644
edit
dl
rm
debug-feature.jam
936
0644
edit
dl
rm
define-feature.jam
708
0644
edit
dl
rm
dependency-feature.jam
2035
0644
edit
dl
rm
dll-feature.jam
2218
0644
edit
dl
rm
exception-feature.jam
1009
0644
edit
dl
rm
fflags-feature.jam
420
0644
edit
dl
rm
file-feature.jam
482
0644
edit
dl
rm
find-lib-feature.jam
1073
0644
edit
dl
rm
flags-feature.jam
492
0644
edit
dl
rm
force-include-feature.jam
572
0644
edit
dl
rm
include-feature.jam
434
0644
edit
dl
rm
instruction-set-feature.jam
2494
0644
edit
dl
rm
internal-feature.jam
440
0644
edit
dl
rm
library-feature.jam
708
0644
edit
dl
rm
link-feature.jam
406
0644
edit
dl
rm
linkflags-feature.jam
377
0644
edit
dl
rm
local-visibility-feature.jam
984
0644
edit
dl
rm
location-feature.jam
453
0644
edit
dl
rm
location-prefix-feature.jam
505
0644
edit
dl
rm
lto-feature.jam
1309
0644
edit
dl
rm
name-feature.jam
632
0644
edit
dl
rm
objcflags-feature.jam
657
0644
edit
dl
rm
optimization-feature.jam
939
0644
edit
dl
rm
os-feature.jam
3687
0644
edit
dl
rm
relevant-feature.jam
1992
0644
edit
dl
rm
rtti-feature.jam
395
0644
edit
dl
rm
runtime-feature.jam
1290
0644
edit
dl
rm
sanitizers-feature.jam
1716
0644
edit
dl
rm
search-feature.jam
516
0644
edit
dl
rm
source-feature.jam
753
0644
edit
dl
rm
stdlib-feature.jam
976
0644
edit
dl
rm
strip-feature.jam
616
0644
edit
dl
rm
tag-feature.jam
1174
0644
edit
dl
rm
threadapi-feature.jam
1162
0644
edit
dl
rm
threading-feature.jam
775
0644
edit
dl
rm
toolset-feature.jam
528
0644
edit
dl
rm
translate-path-feature.jam
944
0644
edit
dl
rm
user-interface-feature.jam
952
0644
edit
dl
rm
variant-feature.jam
3300
0644
edit
dl
rm
version-feature.jam
480
0644
edit
dl
rm
visibility-feature.jam
1987
0644
edit
dl
rm
warnings-feature.jam
1034
0644
edit
dl
rm
__init_features__.jam
743
0644
edit
dl
rm
Edit:
/usr/share/boost-build/src/tools/features/variant-feature.jam
(3300B)
# Copyright 2017 Rene Rivera # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import feature ; import errors ; import property ; #| tag::doc[] [[bbv2.builtin.features.variant]]`variant`:: *Allowed values:* `debug`, `release`, `profile`. + A feature combining several low-level features, making it easy to request common build configurations. + The value `debug` expands to + ---- <optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on ---- + The value `release` expands to + ---- <optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off ---- + The value `profile` expands to the same as `release`, plus: + ---- <profiling>on <debug-symbols>on ---- + Users can define their own build variants using the `variant` rule from the `common` module. + NOTE: Runtime debugging is on in debug builds to suit the expectations of people used to various IDEs. |# # end::doc[] feature.feature variant : : implicit composite propagated symmetric ; # Declares a new variant. # # First determines explicit properties for this variant, by refining parents' # explicit properties with the passed explicit properties. The result is # remembered and will be used if this variant is used as parent. # # Second, determines the full property set for this variant by adding to the # explicit properties default values for all missing non-symmetric properties. # # Lastly, makes appropriate value of 'variant' property expand to the full # property set. # rule variant ( name # Name of the variant : parents-or-properties * # Specifies parent variants, if # 'explicit-properties' are given, and # explicit-properties or parents otherwise. : explicit-properties * # Explicit properties. ) { local parents ; if ! $(explicit-properties) { if $(parents-or-properties[1]:G) { explicit-properties = $(parents-or-properties) ; } else { parents = $(parents-or-properties) ; } } else { parents = $(parents-or-properties) ; } # The problem is that we have to check for conflicts between base variants. if $(parents[2]) { errors.error "multiple base variants are not yet supported" ; } local inherited ; # Add explicitly specified properties for parents. for local p in $(parents) { # TODO: This check may be made stricter. if ! [ feature.is-implicit-value $(p) ] { errors.error "Invalid base variant" $(p) ; } inherited += $(.explicit-properties.$(p)) ; } property.validate $(explicit-properties) ; explicit-properties = [ property.refine $(inherited) : $(explicit-properties) ] ; # Record explicitly specified properties for this variant. We do this after # inheriting parents' properties so they affect other variants derived from # this one. .explicit-properties.$(name) = $(explicit-properties) ; feature.extend variant : $(name) ; feature.compose <variant>$(name) : $(explicit-properties) ; } IMPORT $(__name__) : variant : : variant ;
Save
cmd:
run