mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 00:32:11 +00:00
Merge pull request #216 from boostorg/feature/features
Restructure built-in feature definitions.
This commit is contained in:
@@ -13,6 +13,7 @@ import alias ;
|
||||
import "class" : new ;
|
||||
import errors ;
|
||||
import feature ;
|
||||
import features/__init__ ;
|
||||
import generators ;
|
||||
import numbers ;
|
||||
import os ;
|
||||
@@ -40,360 +41,6 @@ import convert ;
|
||||
import generate ;
|
||||
|
||||
|
||||
.os-names = aix android appletv bsd cygwin darwin freebsd haiku hpux iphone linux netbsd
|
||||
openbsd osf qnx qnxnto sgi solaris unix unixware windows vms
|
||||
elf # Not actually an OS -- used for targeting bare metal where object
|
||||
# format is ELF. This catches both -elf and -eabi gcc targets and well
|
||||
# as other compilers targeting ELF. It is not clear how often we need
|
||||
# the 'elf' key as opposed to other bare metal targets, but let us
|
||||
# stick with gcc naming.
|
||||
;
|
||||
|
||||
# Feature used to determine which OS we're on. New <target-os> and <host-os>
|
||||
# features should be used instead.
|
||||
local os = [ modules.peek : OS ] ;
|
||||
feature.feature os : $(os) : propagated link-incompatible ;
|
||||
|
||||
|
||||
# Translates from bjam current OS to the os tags used in host-os and target-os,
|
||||
# i.e. returns the running host-os.
|
||||
#
|
||||
local rule default-host-os ( )
|
||||
{
|
||||
local host-os ;
|
||||
if [ os.name ] in $(.os-names:U)
|
||||
{
|
||||
host-os = [ os.name ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch [ os.name ]
|
||||
{
|
||||
case NT : host-os = windows ;
|
||||
case AS400 : host-os = unix ;
|
||||
case MINGW : host-os = windows ;
|
||||
case BSDI : host-os = bsd ;
|
||||
case COHERENT : host-os = unix ;
|
||||
case DRAGONFLYBSD : host-os = bsd ;
|
||||
case IRIX : host-os = sgi ;
|
||||
case HAIKU : host-os = haiku ;
|
||||
case MACOSX : host-os = darwin ;
|
||||
case KFREEBSD : host-os = freebsd ;
|
||||
case LINUX : host-os = linux ;
|
||||
case VMS : host-os = vms ;
|
||||
case SUNOS :
|
||||
ECHO "SunOS is not a supported operating system." ;
|
||||
ECHO "We believe last version of SunOS was released in 1992, " ;
|
||||
ECHO "so if you get this message, something is very wrong with configuration logic. " ;
|
||||
ECHO "Please report this as a bug. " ;
|
||||
EXIT ;
|
||||
case * : host-os = unix ;
|
||||
}
|
||||
}
|
||||
return $(host-os:L) ;
|
||||
}
|
||||
|
||||
|
||||
# The two OS features define a known set of abstract OS names. The host-os is
|
||||
# the OS under which bjam is running. Even though this should really be a fixed
|
||||
# property we need to list all the values to prevent unknown value errors. Both
|
||||
# set the default value to the current OS to account for the default use case of
|
||||
# building on the target OS.
|
||||
feature.feature host-os : $(.os-names) ;
|
||||
feature.set-default host-os : [ default-host-os ] ;
|
||||
|
||||
feature.feature target-os : $(.os-names) : propagated link-incompatible ;
|
||||
feature.set-default target-os : [ default-host-os ] ;
|
||||
|
||||
|
||||
feature.feature toolset : : implicit propagated symmetric ;
|
||||
feature.feature stdlib : native : propagated composite ;
|
||||
feature.feature link : shared static : propagated ;
|
||||
feature.feature runtime-link : shared static : propagated ;
|
||||
feature.feature runtime-debugging : on off : propagated ;
|
||||
feature.feature optimization : off speed space : propagated ;
|
||||
feature.feature profiling : off on : propagated ;
|
||||
feature.feature inlining : off on full : propagated ;
|
||||
feature.feature threading : single multi : propagated ;
|
||||
feature.feature rtti : on off : propagated ;
|
||||
feature.feature exception-handling : on off : propagated ;
|
||||
feature.feature vectorize : off on full : propagated ;
|
||||
|
||||
# Whether there is support for asynchronous EH (e.g. catching SEGVs).
|
||||
feature.feature asynch-exceptions : off on : propagated ;
|
||||
|
||||
# Whether all extern "C" functions are considered nothrow by default.
|
||||
feature.feature extern-c-nothrow : off on : propagated ;
|
||||
|
||||
feature.feature debug-symbols : on off : propagated ;
|
||||
# Controls whether the binary should be stripped -- that is have
|
||||
# everything not necessary to running removed. This option should
|
||||
# not be very often needed. Also, this feature will show up in
|
||||
# target paths of everything, not just binaries. Should fix that
|
||||
# when implementing feature relevance.
|
||||
feature.feature strip : off on : propagated ;
|
||||
feature.feature define : : free ;
|
||||
feature.feature undef : : free ;
|
||||
feature.feature "include" : : free path ; #order-sensitive ;
|
||||
feature.feature cflags : : free ;
|
||||
feature.feature cxxflags : : free ;
|
||||
feature.feature fflags : : free ;
|
||||
feature.feature asmflags : : free ;
|
||||
feature.feature linkflags : : free ;
|
||||
feature.feature archiveflags : : free ;
|
||||
feature.feature version : : free ;
|
||||
feature.feature mflags : : free ;
|
||||
feature.feature mmflags : : free ;
|
||||
|
||||
# Generic, i.e. non-language specific, flags for tools.
|
||||
feature.feature flags : : free ;
|
||||
feature.feature location-prefix : : free ;
|
||||
|
||||
|
||||
# The following features are incidental since they have no effect on built
|
||||
# products. Not making them incidental will result in problems in corner cases,
|
||||
# e.g.:
|
||||
#
|
||||
# unit-test a : a.cpp : <use>b ;
|
||||
# lib b : a.cpp b ;
|
||||
#
|
||||
# Here, if <use> is not incidental, we would decide we have two targets for
|
||||
# a.obj with different properties and complain about it.
|
||||
#
|
||||
# Note that making a feature incidental does not mean it is ignored. It may be
|
||||
# ignored when creating a virtual target, but the rest of build process will use
|
||||
# them.
|
||||
feature.feature use : : free dependency incidental ;
|
||||
feature.feature dependency : : free dependency incidental ;
|
||||
feature.feature implicit-dependency : : free dependency incidental ;
|
||||
|
||||
feature.feature warnings :
|
||||
on # Enable default/"reasonable" warning level for the tool.
|
||||
all # Enable all possible warnings issued by the tool.
|
||||
off # Disable all warnings issued by the tool.
|
||||
: incidental propagated ;
|
||||
|
||||
feature.feature warnings-as-errors :
|
||||
off # Do not fail the compilation if there are warnings.
|
||||
on # Fail the compilation if there are warnings.
|
||||
: incidental propagated ;
|
||||
|
||||
# Feature that allows us to configure the maximal template instantiation depth
|
||||
# level allowed by a C++ compiler. Applies only to C++ toolsets whose compilers
|
||||
# actually support this configuration setting.
|
||||
#
|
||||
# Note that Boost Build currently does not allow defining features that take any
|
||||
# positive integral value as a parameter, which is what we need here, so we just
|
||||
# define some of the values here and leave it up to the user to extend this set
|
||||
# as he needs using the feature.extend rule.
|
||||
#
|
||||
# TODO: This should be upgraded as soon as Boost Build adds support for custom
|
||||
# validated feature values or at least features allowing any positive integral
|
||||
# value. See related Boost Build related trac ticket #194.
|
||||
#
|
||||
feature.feature c++-template-depth
|
||||
:
|
||||
[ numbers.range 64 1024 : 64 ]
|
||||
[ numbers.range 20 1000 : 10 ]
|
||||
# Maximum template instantiation depth guaranteed for ANSI/ISO C++
|
||||
# conforming programs.
|
||||
17
|
||||
:
|
||||
incidental optional propagated ;
|
||||
|
||||
feature.feature source : : free dependency incidental ;
|
||||
feature.feature library : : free dependency incidental ;
|
||||
feature.feature file : : free dependency incidental ;
|
||||
feature.feature find-shared-library : : free ; #order-sensitive ;
|
||||
feature.feature find-static-library : : free ; #order-sensitive ;
|
||||
feature.feature library-path : : free path ; #order-sensitive ;
|
||||
|
||||
# Internal feature.
|
||||
feature.feature library-file : : free dependency ;
|
||||
|
||||
feature.feature name : : free ;
|
||||
feature.feature tag : : free ;
|
||||
feature.feature search : : free path ; #order-sensitive ;
|
||||
feature.feature location : : free path ;
|
||||
feature.feature dll-path : : free path ;
|
||||
feature.feature hardcode-dll-paths : true false : incidental ;
|
||||
|
||||
|
||||
# An internal feature that holds the paths of all dependency shared libraries.
|
||||
# On Windows, it is needed so that we can add all those paths to PATH when
|
||||
# running applications. On Linux, it is needed to add proper -rpath-link command
|
||||
# line options.
|
||||
feature.feature xdll-path : : free path ;
|
||||
|
||||
# Provides means to specify def-file for windows DLLs.
|
||||
feature.feature def-file : : free dependency ;
|
||||
|
||||
feature.feature suppress-import-lib : false true : incidental ;
|
||||
|
||||
# Internal feature used to store the name of a bjam action to call when building
|
||||
# a target.
|
||||
feature.feature action : : free ;
|
||||
|
||||
# This feature is used to allow specific generators to run. For example, QT
|
||||
# tools can only be invoked when QT library is used. In that case, <allow>qt
|
||||
# will be in usage requirement of the library.
|
||||
feature.feature allow : : free ;
|
||||
|
||||
# The addressing model to generate code for. Currently a limited set only
|
||||
# specifying the bit size of pointers.
|
||||
feature.feature address-model : 16 32 64 32_64 : propagated optional ;
|
||||
|
||||
# Type of CPU architecture to compile for.
|
||||
feature.feature architecture :
|
||||
# x86 and x86-64
|
||||
x86
|
||||
|
||||
# ia64
|
||||
ia64
|
||||
|
||||
# Sparc
|
||||
sparc
|
||||
|
||||
# RS/6000 & PowerPC
|
||||
power
|
||||
|
||||
# MIPS/SGI
|
||||
mips1 mips2 mips3 mips4 mips32 mips32r2 mips64
|
||||
|
||||
# HP/PA-RISC
|
||||
parisc
|
||||
|
||||
# Advanced RISC Machines
|
||||
arm
|
||||
|
||||
# Combined architectures for platforms/toolsets that support building for
|
||||
# multiple architectures at once. "combined" would be the default multi-arch
|
||||
# for the toolset.
|
||||
combined
|
||||
combined-x86-power
|
||||
|
||||
: propagated optional ;
|
||||
|
||||
# The specific instruction set in an architecture to compile.
|
||||
feature.feature instruction-set :
|
||||
# x86 and x86-64
|
||||
native i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3
|
||||
pentium3m pentium-m pentium4 pentium4m prescott nocona core2 corei7 corei7-avx core-avx-i
|
||||
conroe conroe-xe conroe-l allendale merom merom-xe kentsfield kentsfield-xe penryn wolfdale
|
||||
yorksfield nehalem sandy-bridge ivy-bridge haswell k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp
|
||||
athlon-mp k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona
|
||||
bdver1 bdver2 bdver3 btver1 btver2 winchip-c6 winchip2 c3 c3-2 atom
|
||||
|
||||
# ia64
|
||||
itanium itanium1 merced itanium2 mckinley
|
||||
|
||||
# Sparc
|
||||
v7 cypress v8 supersparc sparclite hypersparc sparclite86x f930 f934
|
||||
sparclet tsc701 v9 ultrasparc ultrasparc3
|
||||
|
||||
# RS/6000 & PowerPC
|
||||
401 403 405 405fp 440 440fp 505 601 602 603 603e 604 604e 620 630 740 7400
|
||||
7450 750 801 821 823 860 970 8540 power-common ec603e g3 g4 g5 power power2
|
||||
power3 power4 power5 powerpc powerpc64 rios rios1 rsc rios2 rs64a
|
||||
|
||||
# MIPS
|
||||
4kc 4kp 5kc 20kc m4k r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650
|
||||
r6000 r8000 rm7000 rm9000 orion sb1 vr4100 vr4111 vr4120 vr4130 vr4300
|
||||
vr5000 vr5400 vr5500
|
||||
|
||||
# HP/PA-RISC
|
||||
700 7100 7100lc 7200 7300 8000
|
||||
|
||||
# Advanced RISC Machines
|
||||
armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312
|
||||
armv7 armv7s
|
||||
|
||||
: propagated optional ;
|
||||
|
||||
# Used to select a specific variant of C++ ABI if the compiler supports several.
|
||||
feature.feature c++abi : : propagated optional ;
|
||||
|
||||
feature.feature conditional : : incidental free ;
|
||||
|
||||
# The value of 'no' prevents building of a target.
|
||||
feature.feature build : yes no : optional ;
|
||||
|
||||
# Windows-specific features
|
||||
|
||||
feature.feature user-interface : console gui wince native auto ;
|
||||
|
||||
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 ;
|
||||
|
||||
|
||||
variant debug : <optimization>off <debug-symbols>on <inlining>off
|
||||
<runtime-debugging>on ;
|
||||
variant release : <optimization>speed <debug-symbols>off <inlining>full
|
||||
|
||||
21
src/tools/features/__init__.jam
Normal file
21
src/tools/features/__init__.jam
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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)
|
||||
|
||||
# Here we automatically define any feature modules in this directory.
|
||||
|
||||
import os path modules ;
|
||||
|
||||
.this-module's-file = [ modules.binding $(__name__) ] ;
|
||||
.this-module's-dir = [ path.parent [ path.make $(.this-module's-file) ] ] ;
|
||||
.feature-jamfiles = [ path.glob $(.this-module's-dir) : *-feature.jam ] ;
|
||||
.feature-modules = [ MATCH ^(.*)\.jam$ : $(.feature-jamfiles) ] ;
|
||||
|
||||
# A loop over all feature modules in this directory
|
||||
for local m in $(.feature-modules)
|
||||
{
|
||||
m = [ path.basename $(m) ] ;
|
||||
m = features/$(m) ;
|
||||
import $(m) ;
|
||||
}
|
||||
13
src/tools/features/address-model-feature.jam
Normal file
13
src/tools/features/address-model-feature.jam
Normal file
@@ -0,0 +1,13 @@
|
||||
# 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)
|
||||
|
||||
# The addressing model to generate code for. Currently a limited set only
|
||||
# specifying the bit size of pointers.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature address-model
|
||||
: 16 32 64 32_64
|
||||
: propagated optional ;
|
||||
14
src/tools/features/allow-feature.jam
Normal file
14
src/tools/features/allow-feature.jam
Normal file
@@ -0,0 +1,14 @@
|
||||
# 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)
|
||||
|
||||
# This feature is used to allow specific generators to run. For example, QT
|
||||
# tools can only be invoked when QT library is used. In that case, <allow>qt
|
||||
# will be in usage requirement of the library.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature allow
|
||||
:
|
||||
: free ;
|
||||
40
src/tools/features/architecture-feature.jam
Normal file
40
src/tools/features/architecture-feature.jam
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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)
|
||||
|
||||
# Type of CPU architecture to compile for.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature architecture
|
||||
:
|
||||
# x86 and x86-64
|
||||
x86
|
||||
|
||||
# ia64
|
||||
ia64
|
||||
|
||||
# Sparc
|
||||
sparc
|
||||
|
||||
# RS/6000 & PowerPC
|
||||
power
|
||||
|
||||
# MIPS/SGI
|
||||
mips1 mips2 mips3 mips4 mips32 mips32r2 mips64
|
||||
|
||||
# HP/PA-RISC
|
||||
parisc
|
||||
|
||||
# Advanced RISC Machines
|
||||
arm
|
||||
|
||||
# Combined architectures for platforms/toolsets that support building for
|
||||
# multiple architectures at once. "combined" would be the default multi-arch
|
||||
# for the toolset.
|
||||
combined
|
||||
combined-x86-power
|
||||
:
|
||||
propagated optional
|
||||
;
|
||||
12
src/tools/features/archiveflags-feature.jam
Normal file
12
src/tools/features/archiveflags-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature archiveflags
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/asmflags-feature.jam
Normal file
12
src/tools/features/asmflags-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature asmflags
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/build-feature.jam
Normal file
12
src/tools/features/build-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# The value of 'no' prevents building of a target.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature build
|
||||
: yes no
|
||||
: optional ;
|
||||
12
src/tools/features/cflags-feature.jam
Normal file
12
src/tools/features/cflags-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature cflags
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/conditional-feature.jam
Normal file
12
src/tools/features/conditional-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature conditional
|
||||
:
|
||||
: incidental free ;
|
||||
31
src/tools/features/cxx-template-depth-feature.jam
Normal file
31
src/tools/features/cxx-template-depth-feature.jam
Normal file
@@ -0,0 +1,31 @@
|
||||
# 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)
|
||||
|
||||
# Feature that allows us to configure the maximal template instantiation depth
|
||||
# level allowed by a C++ compiler. Applies only to C++ toolsets whose compilers
|
||||
# actually support this configuration setting.
|
||||
#
|
||||
# Note that Boost Build currently does not allow defining features that take any
|
||||
# positive integral value as a parameter, which is what we need here, so we just
|
||||
# define some of the values here and leave it up to the user to extend this set
|
||||
# as he needs using the feature.extend rule.
|
||||
#
|
||||
# TODO: This should be upgraded as soon as Boost Build adds support for custom
|
||||
# validated feature values or at least features allowing any positive integral
|
||||
# value. See related Boost Build related trac ticket #194.
|
||||
#
|
||||
|
||||
import feature ;
|
||||
import numbers ;
|
||||
|
||||
feature.feature c++-template-depth
|
||||
:
|
||||
[ numbers.range 64 1024 : 64 ]
|
||||
[ numbers.range 20 1000 : 10 ]
|
||||
# Maximum template instantiation depth guaranteed for ANSI/ISO C++
|
||||
# conforming programs.
|
||||
17
|
||||
:
|
||||
incidental optional propagated ;
|
||||
12
src/tools/features/cxxabi-feature.jam
Normal file
12
src/tools/features/cxxabi-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# Used to select a specific variant of C++ ABI if the compiler supports several.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature c++abi
|
||||
:
|
||||
: propagated optional ;
|
||||
12
src/tools/features/cxxflags-feature.jam
Normal file
12
src/tools/features/cxxflags-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature cxxflags
|
||||
:
|
||||
: free ;
|
||||
34
src/tools/features/cxxstd-feature.jam
Normal file
34
src/tools/features/cxxstd-feature.jam
Normal file
@@ -0,0 +1,34 @@
|
||||
# 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 ;
|
||||
|
||||
# The `cxxstd` feature specifies the version of the C++ Standard Language to
|
||||
# build with. All the official versions of the standard since "98" are
|
||||
# included: `98`, `03`, `11`, `14`, and `17`. It is also possible to
|
||||
# specify using the experimental, work in progress, `latest` version. Some
|
||||
# compilers specified intermediate versions for the experimental versions
|
||||
# leading up to the released standard version. Those are included following
|
||||
# the GNU nomenclature as `0x`, `1y`, `1z`, and `2a`. And depending on the
|
||||
# compiler `latest` would map to one of those.
|
||||
#
|
||||
# NOTE: This is an `optional` feature. Hence when not specified the compiler
|
||||
# default behaviour is used.
|
||||
#
|
||||
# NOTE: Please consult the toolset specific documentation for which `cxxstd`
|
||||
# is supported.
|
||||
|
||||
feature.feature cxxstd
|
||||
: 98 03 0x 11 1y 14 1z 17 2a latest
|
||||
: optional composite propagated ;
|
||||
|
||||
# The cxxstd:dialet subfeature indicates if a non-standard dialect should be
|
||||
# used. These usually have either/or extensions or platform specific
|
||||
# functionality. Not specifying the dialect will disable any dialect and use
|
||||
# ANSI C++ Standard conformance.
|
||||
|
||||
feature.subfeature cxxstd : dialect
|
||||
: gnu ms
|
||||
: optional composite propagated ;
|
||||
16
src/tools/features/debug-feature.jam
Normal file
16
src/tools/features/debug-feature.jam
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature debug-symbols
|
||||
: on off
|
||||
: propagated ;
|
||||
|
||||
feature.feature profiling
|
||||
: off on
|
||||
: propagated ;
|
||||
16
src/tools/features/define-feature.jam
Normal file
16
src/tools/features/define-feature.jam
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature define
|
||||
:
|
||||
: free ;
|
||||
|
||||
feature.feature undef
|
||||
:
|
||||
: free ;
|
||||
32
src/tools/features/dependency-feature.jam
Normal file
32
src/tools/features/dependency-feature.jam
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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)
|
||||
|
||||
# The following features are incidental since they have no effect on built
|
||||
# products. Not making them incidental will result in problems in corner cases,
|
||||
# e.g.:
|
||||
#
|
||||
# unit-test a : a.cpp : <use>b ;
|
||||
# lib b : a.cpp b ;
|
||||
#
|
||||
# Here, if <use> is not incidental, we would decide we have two targets for
|
||||
# a.obj with different properties and complain about it.
|
||||
#
|
||||
# Note that making a feature incidental does not mean it is ignored. It may be
|
||||
# ignored when creating a virtual target, but the rest of build process will use
|
||||
# them.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature use
|
||||
:
|
||||
: free dependency incidental ;
|
||||
|
||||
feature.feature dependency
|
||||
:
|
||||
: free dependency incidental ;
|
||||
|
||||
feature.feature implicit-dependency
|
||||
:
|
||||
: free dependency incidental ;
|
||||
33
src/tools/features/dll-feature.jam
Normal file
33
src/tools/features/dll-feature.jam
Normal file
@@ -0,0 +1,33 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature dll-path
|
||||
:
|
||||
: free path ;
|
||||
|
||||
feature.feature hardcode-dll-paths
|
||||
: true false
|
||||
: incidental ;
|
||||
|
||||
# An internal feature that holds the paths of all dependency shared libraries.
|
||||
# On Windows, it is needed so that we can add all those paths to PATH when
|
||||
# running applications. On Linux, it is needed to add proper -rpath-link command
|
||||
# line options.
|
||||
feature.feature xdll-path
|
||||
:
|
||||
: free path ;
|
||||
|
||||
# Provides means to specify def-file for windows DLLs.
|
||||
feature.feature def-file
|
||||
:
|
||||
: free dependency ;
|
||||
|
||||
feature.feature suppress-import-lib
|
||||
: false true
|
||||
: incidental ;
|
||||
22
src/tools/features/exception-feature.jam
Normal file
22
src/tools/features/exception-feature.jam
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature exception-handling
|
||||
: on off
|
||||
: propagated ;
|
||||
|
||||
# Whether there is support for asynchronous EH (e.g. catching SEGVs).
|
||||
feature.feature asynch-exceptions
|
||||
: off on
|
||||
: propagated ;
|
||||
|
||||
# Whether all extern "C" functions are considered nothrow by default.
|
||||
feature.feature extern-c-nothrow
|
||||
: off on
|
||||
: propagated ;
|
||||
12
src/tools/features/fflags-feature.jam
Normal file
12
src/tools/features/fflags-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature fflags
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/file-feature.jam
Normal file
12
src/tools/features/file-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature file
|
||||
:
|
||||
: free dependency incidental ;
|
||||
20
src/tools/features/find-lib-feature.jam
Normal file
20
src/tools/features/find-lib-feature.jam
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature find-shared-library
|
||||
:
|
||||
: free ; #order-sensitive ;
|
||||
|
||||
feature.feature find-static-library
|
||||
:
|
||||
: free ; #order-sensitive ;
|
||||
|
||||
feature.feature library-path
|
||||
:
|
||||
: free path ; #order-sensitive ;
|
||||
12
src/tools/features/flags-feature.jam
Normal file
12
src/tools/features/flags-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# Generic, i.e. non-language specific, flags for tools.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature flags
|
||||
:
|
||||
: free ;
|
||||
13
src/tools/features/include-feature.jam
Normal file
13
src/tools/features/include-feature.jam
Normal file
@@ -0,0 +1,13 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature "include"
|
||||
:
|
||||
: free path #order-sensitive
|
||||
;
|
||||
46
src/tools/features/instruction-set-feature.jam
Normal file
46
src/tools/features/instruction-set-feature.jam
Normal file
@@ -0,0 +1,46 @@
|
||||
# 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)
|
||||
|
||||
# The specific instruction set in an architecture to compile.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature instruction-set
|
||||
:
|
||||
# x86 and x86-64
|
||||
native i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3
|
||||
pentium3m pentium-m pentium4 pentium4m prescott nocona core2 corei7 corei7-avx core-avx-i
|
||||
conroe conroe-xe conroe-l allendale merom merom-xe kentsfield kentsfield-xe penryn wolfdale
|
||||
yorksfield nehalem sandy-bridge ivy-bridge haswell k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp
|
||||
athlon-mp k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona
|
||||
bdver1 bdver2 bdver3 btver1 btver2 winchip-c6 winchip2 c3 c3-2 atom
|
||||
|
||||
# ia64
|
||||
itanium itanium1 merced itanium2 mckinley
|
||||
|
||||
# Sparc
|
||||
v7 cypress v8 supersparc sparclite hypersparc sparclite86x f930 f934
|
||||
sparclet tsc701 v9 ultrasparc ultrasparc3
|
||||
|
||||
# RS/6000 & PowerPC
|
||||
401 403 405 405fp 440 440fp 505 601 602 603 603e 604 604e 620 630 740 7400
|
||||
7450 750 801 821 823 860 970 8540 power-common ec603e g3 g4 g5 power power2
|
||||
power3 power4 power5 powerpc powerpc64 rios rios1 rsc rios2 rs64a
|
||||
|
||||
# MIPS
|
||||
4kc 4kp 5kc 20kc m4k r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650
|
||||
r6000 r8000 rm7000 rm9000 orion sb1 vr4100 vr4111 vr4120 vr4130 vr4300
|
||||
vr5000 vr5400 vr5500
|
||||
|
||||
# HP/PA-RISC
|
||||
700 7100 7100lc 7200 7300 8000
|
||||
|
||||
# Advanced RISC Machines
|
||||
armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312
|
||||
armv7 armv7s
|
||||
|
||||
:
|
||||
propagated optional
|
||||
;
|
||||
19
src/tools/features/internal-feature.jam
Normal file
19
src/tools/features/internal-feature.jam
Normal file
@@ -0,0 +1,19 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
# Internal feature.
|
||||
feature.feature library-file
|
||||
:
|
||||
: free dependency ;
|
||||
|
||||
# Internal feature used to store the name of a bjam action to call when building
|
||||
# a target.
|
||||
feature.feature action
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/library-feature.jam
Normal file
12
src/tools/features/library-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature library
|
||||
:
|
||||
: free dependency incidental ;
|
||||
12
src/tools/features/link-feature.jam
Normal file
12
src/tools/features/link-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature link
|
||||
: shared static
|
||||
: propagated ;
|
||||
12
src/tools/features/linkflags-feature.jam
Normal file
12
src/tools/features/linkflags-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature linkflags
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/location-feature.jam
Normal file
12
src/tools/features/location-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature location
|
||||
:
|
||||
: free path ;
|
||||
12
src/tools/features/location-prefix-feature.jam
Normal file
12
src/tools/features/location-prefix-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature location-prefix
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/name-feature.jam
Normal file
12
src/tools/features/name-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature name
|
||||
:
|
||||
: free ;
|
||||
16
src/tools/features/objcflags-feature.jam
Normal file
16
src/tools/features/objcflags-feature.jam
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature mflags
|
||||
:
|
||||
: free ;
|
||||
|
||||
feature.feature mmflags
|
||||
:
|
||||
: free ;
|
||||
20
src/tools/features/optimization-feature.jam
Normal file
20
src/tools/features/optimization-feature.jam
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature optimization
|
||||
: off speed space
|
||||
: propagated ;
|
||||
|
||||
feature.feature inlining
|
||||
: off on full
|
||||
: propagated ;
|
||||
|
||||
feature.feature vectorize
|
||||
: off on full
|
||||
: propagated ;
|
||||
78
src/tools/features/os-feature.jam
Normal file
78
src/tools/features/os-feature.jam
Normal file
@@ -0,0 +1,78 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
import modules ;
|
||||
import os ;
|
||||
|
||||
.os-names =
|
||||
aix android appletv bsd cygwin darwin freebsd haiku hpux iphone linux
|
||||
netbsd openbsd osf qnx qnxnto sgi solaris unix unixware windows vms
|
||||
|
||||
# Not actually an OS -- used for targeting bare metal where object
|
||||
# format is ELF. This catches both -elf and -eabi gcc targets as well
|
||||
# as other compilers targeting ELF. It is not clear how often we need
|
||||
# the 'elf' key as opposed to other bare metal targets, but let us
|
||||
# stick with gcc naming.
|
||||
elf
|
||||
;
|
||||
|
||||
# Feature used to determine which OS we're on. New <target-os> and <host-os>
|
||||
# features should be used instead.
|
||||
local os = [ modules.peek : OS ] ;
|
||||
feature.feature os : $(os) : propagated link-incompatible ;
|
||||
|
||||
# Translates from bjam current OS to the os tags used in host-os and
|
||||
# target-os, i.e. returns the running host-os.
|
||||
#
|
||||
local rule default-host-os ( )
|
||||
{
|
||||
local host-os ;
|
||||
if [ os.name ] in $(.os-names:U)
|
||||
{
|
||||
host-os = [ os.name ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch [ os.name ]
|
||||
{
|
||||
case NT : host-os = windows ;
|
||||
case AS400 : host-os = unix ;
|
||||
case MINGW : host-os = windows ;
|
||||
case BSDI : host-os = bsd ;
|
||||
case COHERENT : host-os = unix ;
|
||||
case DRAGONFLYBSD : host-os = bsd ;
|
||||
case IRIX : host-os = sgi ;
|
||||
case HAIKU : host-os = haiku ;
|
||||
case MACOSX : host-os = darwin ;
|
||||
case KFREEBSD : host-os = freebsd ;
|
||||
case LINUX : host-os = linux ;
|
||||
case VMS : host-os = vms ;
|
||||
case SUNOS :
|
||||
ECHO
|
||||
"SunOS is not a supported operating system."
|
||||
"We believe last version of SunOS was released in 1992, "
|
||||
"so if you get this message, something is very wrong with "
|
||||
"configuration logic. Please report this as a bug. " ;
|
||||
EXIT ;
|
||||
case * : host-os = unix ;
|
||||
}
|
||||
}
|
||||
return $(host-os:L) ;
|
||||
}
|
||||
|
||||
|
||||
# The two OS features define a known set of abstract OS names. The host-os is
|
||||
# the OS under which bjam is running. Even though this should really be a fixed
|
||||
# property we need to list all the values to prevent unknown value errors. Both
|
||||
# set the default value to the current OS to account for the default use case of
|
||||
# building on the target OS.
|
||||
feature.feature host-os : $(.os-names) ;
|
||||
feature.set-default host-os : [ default-host-os ] ;
|
||||
|
||||
feature.feature target-os : $(.os-names) : propagated link-incompatible ;
|
||||
feature.set-default target-os : [ default-host-os ] ;
|
||||
12
src/tools/features/rtti-feature.jam
Normal file
12
src/tools/features/rtti-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature rtti
|
||||
: on off
|
||||
: propagated ;
|
||||
16
src/tools/features/runtime-feature.jam
Normal file
16
src/tools/features/runtime-feature.jam
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature runtime-link
|
||||
: shared static
|
||||
: propagated ;
|
||||
|
||||
feature.feature runtime-debugging
|
||||
: on off
|
||||
: propagated ;
|
||||
13
src/tools/features/search-feature.jam
Normal file
13
src/tools/features/search-feature.jam
Normal file
@@ -0,0 +1,13 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature search
|
||||
:
|
||||
: free path #order-sensitive
|
||||
;
|
||||
12
src/tools/features/source-feature.jam
Normal file
12
src/tools/features/source-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature source
|
||||
:
|
||||
: free dependency incidental ;
|
||||
12
src/tools/features/stdlib-feature.jam
Normal file
12
src/tools/features/stdlib-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature stdlib
|
||||
: native
|
||||
: propagated composite ;
|
||||
19
src/tools/features/strip-feature.jam
Normal file
19
src/tools/features/strip-feature.jam
Normal file
@@ -0,0 +1,19 @@
|
||||
# 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)
|
||||
|
||||
# Controls whether the binary should be stripped -- that is have
|
||||
# everything not necessary to running removed. This option should
|
||||
# not be very often needed.
|
||||
#
|
||||
# NOTE: Also, this feature will show up in
|
||||
# target paths of everything, not just binaries.
|
||||
#
|
||||
# TODO: Should fix that when implementing feature relevance.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature strip
|
||||
: off on
|
||||
: propagated ;
|
||||
12
src/tools/features/tag-feature.jam
Normal file
12
src/tools/features/tag-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature tag
|
||||
:
|
||||
: free ;
|
||||
12
src/tools/features/threading-feature.jam
Normal file
12
src/tools/features/threading-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature threading
|
||||
: single multi
|
||||
: propagated ;
|
||||
12
src/tools/features/toolset-feature.jam
Normal file
12
src/tools/features/toolset-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature toolset
|
||||
:
|
||||
: implicit propagated symmetric ;
|
||||
13
src/tools/features/user-interface-feature.jam
Normal file
13
src/tools/features/user-interface-feature.jam
Normal file
@@ -0,0 +1,13 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
# Windows-specific feature?
|
||||
|
||||
feature.feature user-interface
|
||||
: console gui wince native auto ;
|
||||
82
src/tools/features/variant-feature.jam
Normal file
82
src/tools/features/variant-feature.jam
Normal file
@@ -0,0 +1,82 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
import errors ;
|
||||
import property ;
|
||||
|
||||
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 ;
|
||||
12
src/tools/features/version-feature.jam
Normal file
12
src/tools/features/version-feature.jam
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature version
|
||||
:
|
||||
: free ;
|
||||
21
src/tools/features/warnings-feature.jam
Normal file
21
src/tools/features/warnings-feature.jam
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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)
|
||||
|
||||
# TODO: Documentation.
|
||||
|
||||
import feature ;
|
||||
|
||||
feature.feature warnings
|
||||
:
|
||||
on # Enable default/"reasonable" warning level for the tool.
|
||||
all # Enable all possible warnings issued by the tool.
|
||||
off # Disable all warnings issued by the tool.
|
||||
: incidental propagated ;
|
||||
|
||||
feature.feature warnings-as-errors
|
||||
:
|
||||
off # Do not fail the compilation if there are warnings.
|
||||
on # Fail the compilation if there are warnings.
|
||||
: incidental propagated ;
|
||||
@@ -561,7 +561,7 @@ toolset.flags python.capture-output PYTHON : <python.interpreter> ;
|
||||
# Support for Python configured --with-pydebug
|
||||
#
|
||||
feature.feature python-debugging : off on : propagated ;
|
||||
builtin.variant debug-python : debug : <python-debugging>on ;
|
||||
variant debug-python : debug : <python-debugging>on ;
|
||||
|
||||
|
||||
# Return a list of candidate commands to try when looking for a Python
|
||||
|
||||
Reference in New Issue
Block a user