コード例 #1
0
ファイル: type.py プロジェクト: ibrahim01832891988/ssh-rd
def __register_features():
    """ Register features need by this module.
    """
    # The feature is optional so that it is never implicitly added.
    # It's used only for internal purposes, and in all cases we
    # want to explicitly use it.
    feature.feature("target-type", [], ["composite", "optional"])
    feature.feature("main-target-type", [], ["optional", "incidental"])
    feature.feature("base-target-type", [], ["composite", "optional", "free"])
コード例 #2
0
ファイル: type.py プロジェクト: Bandeira/sps
def __register_features ():
    """ Register features need by this module.
    """
    # The feature is optional so that it is never implicitly added.
    # It's used only for internal purposes, and in all cases we
    # want to explicitly use it.
    feature.feature ('target-type', [], ['composite', 'optional'])
    feature.feature ('main-target-type', [], ['optional', 'incidental'])
    feature.feature ('base-target-type', [], ['composite', 'optional', 'free'])
コード例 #3
0
def __register_features ():
    """ Register features need by this module.
    """
    # The feature is optional so that it is never implicitly added.
    # It's used only for internal purposes, and in all cases we
    # want to explicitly use it.
    feature.feature ('target-type', [], ['composite', 'optional'])
    feature.feature ('main-target-type', [], ['optional', 'incidental'])
    feature.feature ('base-target-type', [], ['composite', 'optional', 'free'])
コード例 #4
0
ファイル: pch.py プロジェクト: malinost/boost
#      ;
#
# Add cpp-pch to sources:
#
#    exe hello
#      : main.cpp hello.cpp mypch
#      ;

from b2.build import type, feature, generators

type.register('PCH', ['pch'])
type.register('C_PCH', [], 'PCH')
type.register('CPP_PCH', [], 'PCH')

# Control precompiled header (PCH) generation.
feature.feature('pch', ['on', 'off'], ['propagated'])

feature.feature('pch-header', [], ['free', 'dependency'])
feature.feature('pch-file', [], ['free', 'dependency'])


class PchGenerator(generators.Generator):
    """
        Base PCH generator. The 'run' method has the logic to prevent this generator
        from being run unless it's being used for a top-level PCH target.
    """
    def action_class(self):
        return 'compile-action'

    def run(self, project, name, prop_set, sources):
        if not name:
コード例 #5
0
# Note that the requirements are automatically transformed into suitable
# tags to find the correct pre-built library.
#

import re

import bjam

from b2.build import alias, property, property_set, feature
from b2.manager import get_manager
from b2.tools import builtin, common
from b2.util import bjam_signature, regex


# TODO: This is currently necessary in Python Port, but was not in Jam.
feature.feature('layout', ['system', 'versioned', 'tag'], ['optional'])
feature.feature('root', [], ['optional', 'free'])
feature.feature('build-id', [], ['optional', 'free'])

__initialized = None
__boost_auto_config = property_set.create([property.Property('layout', 'system')])
__boost_configured = {}
__boost_default = None
__build_id = None

__debug = None

def debug():
    global __debug
    if __debug is None:
        __debug = "--debug-configuration" in bjam.variable("ARGV")        
コード例 #6
0
import b2.build.property as property
import b2.build.property_set as property_set
import b2.build.generators as generators
import b2.build.virtual_target as virtual_target

from b2.manager import get_manager
from b2.util.sequence import unique
from b2.util import bjam_signature

import b2.build.type

import os.path
import re
import types

feature.feature('install-dependencies', ['off', 'on'], ['incidental'])
feature.feature('install-type', [], ['free', 'incidental'])
feature.feature('install-source-root', [], ['free', 'path'])
feature.feature('so-version', [], ['free', 'incidental'])

# If 'on', version symlinks for shared libraries will not be created. Affects
# Unix builds only.
feature.feature('install-no-version-symlinks', ['on'],
                ['optional', 'incidental'])


class InstallTargetClass(targets.BasicTarget):
    def update_location(self, ps):
        """If <location> is not set, sets it based on the project data."""

        loc = ps.get('location')
コード例 #7
0
from b2.util.utility import *
from b2.build import feature
from b2.util import sequence, qualify_jam_action, is_iterable_typed
import b2.util.set
from b2.manager import get_manager

__re_two_ampersands = re.compile('&&')
__re_comma = re.compile(',')
__re_split_condition = re.compile('(.*):(<.*)')
__re_split_conditional = re.compile(r'(.+):<(.+)')
__re_colon = re.compile(':')
__re_has_condition = re.compile(r':<')
__re_separate_condition_and_property = re.compile(r'(.*):(<.*)')

__not_applicable_feature = 'not-applicable-in-this-context'
feature.feature(__not_applicable_feature, [], ['free'])

__abbreviated_paths = False


class Property(object):

    __slots__ = ('_feature', '_value', '_condition')

    def __init__(self, f, value, condition=[]):
        if type(f) == type(""):
            f = feature.get(f)
        # At present, single property has a single value.
        assert type(value) != type([])
        assert (f.free() or value.find(':') == -1)
        self._feature = f
コード例 #8
0
ファイル: pch.py プロジェクト: 0xDEC0DE8/mcsema
# Add cpp-pch to sources:
#
#    exe hello
#      : main.cpp hello.cpp mypch
#      ;

from b2.build import type, feature, generators
from b2.tools import builtin

type.register('PCH', ['pch'])
type.register('C_PCH', [], 'PCH')
type.register('CPP_PCH', [], 'PCH')

# Control precompiled header (PCH) generation.
feature.feature('pch',
                ['on', 'off'],
                ['propagated'])

feature.feature('pch-header', [], ['free', 'dependency'])
feature.feature('pch-file', [], ['free', 'dependency'])

class PchGenerator(generators.Generator):
    """
        Base PCH generator. The 'run' method has the logic to prevent this generator
        from being run unless it's being used for a top-level PCH target.
    """
    def action_class(self):
        return builtin.CompileAction

    def run(self, project, name, prop_set, sources):
        if not name:
コード例 #9
0
ファイル: boost.py プロジェクト: ash-github/FatCat-Server
# Note that the requirements are automatically transformed into suitable
# tags to find the correct pre-built library.
#

import re

import bjam

from b2.build import alias, property, property_set, feature
from b2.manager import get_manager
from b2.tools import builtin, common
from b2.util import bjam_signature, regex


# TODO: This is currently necessary in Python Port, but was not in Jam.
feature.feature('layout', ['system', 'versioned', 'tag'], ['optional'])
feature.feature('root', [], ['optional', 'free'])
feature.feature('build-id', [], ['optional', 'free'])

__initialized = None
__boost_auto_config = property_set.create([property.Property('layout', 'system')])
__boost_configured = {}
__boost_default = None
__build_id = None

__debug = None

def debug():
    global __debug
    if __debug is None:
        __debug = "--debug-configuration" in bjam.variable("ARGV")        
コード例 #10
0
from b2.util import stem, bjam_signature
from b2.util.sequence import unique

import bjam

import re
import os.path
import sys


def init():
    pass


# Feature controling the command used to lanch test programs.
feature.feature("testing.launcher", [], ["free", "optional"])

feature.feature("test-info", [], ["free", "incidental"])
feature.feature("testing.arg", [], ["free", "incidental"])
feature.feature("testing.input-file", [], ["free", "dependency"])

feature.feature("preserve-test-targets", ["on", "off"],
                ["incidental", "propagated"])

# Register target types.
type.register("TEST", ["test"])
type.register("COMPILE", [], "TEST")
type.register("COMPILE_FAIL", [], "TEST")

type.register("RUN_OUTPUT", ["run"])
type.register("RUN", [], "TEST")
コード例 #11
0
ファイル: boost.py プロジェクト: X-Plane/xptools_msvc_libs
# Note that the requirements are automatically transformed into suitable
# tags to find the correct pre-built library.
#

import re

import bjam

from b2.build import alias, property, property_set, feature
from b2.manager import get_manager
from b2.tools import builtin, common
from b2.util import bjam_signature, regex


# TODO: This is currently necessary in Python Port, but was not in Jam.
feature.feature("layout", ["system", "versioned", "tag"], ["optional"])
feature.feature("root", [], ["optional", "free"])
feature.feature("build-id", [], ["optional", "free"])

__initialized = None
__boost_auto_config = property_set.create([property.Property("layout", "system")])
__boost_configured = {}
__boost_default = None
__build_id = None

__debug = None


def debug():
    global __debug
    if __debug is None:
コード例 #12
0
ファイル: mc.py プロジェクト: zjutjsj1004/third
import bjam

from b2.tools import common, rc
from b2.build import generators, type
from b2.build.toolset import flags
from b2.build.feature import feature
from b2.manager import get_manager

def init():
    pass

type.register('MC', ['mc'])


# Command line options
feature('mc-input-encoding', ['ansi', 'unicode'], ['free'])
feature('mc-output-encoding', ['unicode', 'ansi'], ['free'])
feature('mc-set-customer-bit', ['no', 'yes'], ['free'])

flags('mc.compile', 'MCFLAGS', ['<mc-input-encoding>ansi'], ['-a'])
flags('mc.compile', 'MCFLAGS', ['<mc-input-encoding>unicode'], ['-u'])
flags('mc.compile', 'MCFLAGS', ['<mc-output-encoding>ansi'], '-A')
flags('mc.compile', 'MCFLAGS', ['<mc-output-encoding>unicode'], ['-U'])
flags('mc.compile', 'MCFLAGS', ['<mc-set-customer-bit>no'], [])
flags('mc.compile', 'MCFLAGS', ['<mc-set-customer-bit>yes'], ['-c'])

generators.register_standard('mc.compile', ['MC'], ['H', 'RC'])

get_manager().engine().register_action(
    'mc.compile',
    'mc $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"')
コード例 #13
0
ファイル: symlink.py プロジェクト: FreCap/telnet-boost
# Defines the "symlink" special target. 'symlink' targets make symbolic links
# to the sources.

import b2.build.feature as feature
import b2.build.targets as targets
import b2.build.property_set as property_set
import b2.build.virtual_target as virtual_target
import b2.build.targets

from b2.manager import get_manager

import bjam

import os

feature.feature("symlink-location", ["project-relative", "build-relative"],
                ["incidental"])


class SymlinkTarget(targets.BasicTarget):

    _count = 0

    def __init__(self, project, targets, sources):

        # Generate a fake name for now. Need unnamed targets eventually.
        fake_name = "symlink#%s" % SymlinkTarget._count
        SymlinkTarget._count = SymlinkTarget._count + 1

        b2.build.targets.BasicTarget.__init__(self, fake_name, project,
                                              sources)
コード例 #14
0
ファイル: symlink.py プロジェクト: zjutjsj1004/third
# to the sources.

import b2.build.feature as feature
import b2.build.targets as targets
import b2.build.property_set as property_set
import b2.build.virtual_target as virtual_target
import b2.build.targets

from b2.manager import get_manager

import bjam

import os


feature.feature("symlink-location", ["project-relative", "build-relative"], ["incidental"])

class SymlinkTarget(targets.BasicTarget):

    _count = 0

    def __init__(self, project, targets, sources):

        # Generate a fake name for now. Need unnamed targets eventually.
        fake_name = "symlink#%s" % SymlinkTarget._count
        SymlinkTarget._count = SymlinkTarget._count + 1

        b2.build.targets.BasicTarget.__init__(self, fake_name, project, sources)

        # Remember the targets to map the sources onto. Pad or truncate
        # to fit the sources given.
コード例 #15
0
ファイル: boostcpp.py プロジェクト: AlexMioMio/boost
import b2.util.set as set

from b2.build.alias import AliasTarget, alias
from b2.tools.message import message

from b2.manager import get_manager
from b2.util import bjam_signature, value_to_jam
from b2.util.sequence import unique



import sys
import os

# FIXME: temporary fix until I port the xsltproc module
feature.feature("xsl:param", [], ["free"])


##############################################################################
# 
# 0. General setup. Parse options, check them.
#
##############################################################################  

BOOST_ROOT = get_manager().projects().loaded_tool_module_path_[__name__]

print "HERE I AM"
@bjam_signature((["version"],))
def set_version(version):
    global BOOST_VERSION, BOOST_VERSION_TAG
コード例 #16
0
ファイル: darwin.py プロジェクト: Cabriter/abelkhan
    condition = common.check_init_parameters ('darwin', None, ('version', version))

    command = common.get_invocation_command ('darwin', 'g++', command)

    common.handle_options ('darwin', condition, command, options)

    gcc.init_link_flags ('darwin', 'darwin', condition)

# Darwin has a different shared library suffix
type.set_generated_target_suffix ('SHARED_LIB', ['<toolset>darwin'], 'dylib')

# we need to be able to tell the type of .dylib files
type.register_suffixes ('dylib', 'SHARED_LIB')

feature.feature ('framework', [], ['free'])

toolset.flags ('darwin.compile', 'OPTIONS', '<link>shared', ['-dynamic'])
toolset.flags ('darwin.compile', 'OPTIONS', None, ['-Wno-long-double', '-no-cpp-precomp'])
toolset.flags ('darwin.compile.c++', 'OPTIONS', None, ['-fcoalesce-templates'])

toolset.flags ('darwin.link', 'FRAMEWORK', '<framework>')

# This is flag is useful for debugging the link step
# uncomment to see what libtool is doing under the hood
# toolset.flags ('darwin.link.dll', 'OPTIONS', None, '[-Wl,-v'])

action.register ('darwin.compile.cpp', None, ['$(CONFIG_COMMAND) $(ST_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK) $(OPTIONS)'])

# TODO: how to set 'bind LIBRARIES'?
action.register ('darwin.link.dll', None, ['$(CONFIG_COMMAND) -dynamiclib -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK) $(OPTIONS)'])
コード例 #17
0
ファイル: package.py プロジェクト: Badenhoop/remote_control
import b2.build.feature as feature
import b2.build.property as property
import b2.util.option as option
import b2.tools.stage as stage

from b2.build.alias import alias

from b2.manager import get_manager

from b2.util import bjam_signature
from b2.util.utility import ungrist

import os

feature.feature("install-default-prefix", [], ["free", "incidental"])


@bjam_signature((["name", "package_name",
                  "?"], ["requirements", "*"], ["binaries",
                                                "*"], ["libraries",
                                                       "*"], ["headers", "*"]))
def install(name,
            package_name=None,
            requirements=[],
            binaries=[],
            libraries=[],
            headers=[]):

    requirements = requirements[:]
    binaries = binaries[:]
コード例 #18
0
#    message compiling action.

from b2.build import generators, type
from b2.build.feature import feature
from b2.build.toolset import flags
from b2.manager import get_manager


def init():
    pass


type.register('MC', ['mc'])

# Command line options
feature('mc-input-encoding', ['ansi', 'unicode'], ['free'])
feature('mc-output-encoding', ['unicode', 'ansi'], ['free'])
feature('mc-set-customer-bit', ['no', 'yes'], ['free'])

flags('mc.compile', 'MCFLAGS', ['<mc-input-encoding>ansi'], ['-a'])
flags('mc.compile', 'MCFLAGS', ['<mc-input-encoding>unicode'], ['-u'])
flags('mc.compile', 'MCFLAGS', ['<mc-output-encoding>ansi'], '-A')
flags('mc.compile', 'MCFLAGS', ['<mc-output-encoding>unicode'], ['-U'])
flags('mc.compile', 'MCFLAGS', ['<mc-set-customer-bit>no'], [])
flags('mc.compile', 'MCFLAGS', ['<mc-set-customer-bit>yes'], ['-c'])

generators.register_standard('mc.compile', ['MC'], ['H', 'RC'])

get_manager().engine().register_action(
    'mc.compile',
    'mc $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"')
コード例 #19
0
ファイル: midl.py プロジェクト: kjedruczyk/build
        engine.set_target_variable(included_quoted, "SEARCH", [utility.get_value(inc) for inc in self.includes])
        engine.set_target_variable(imported, "SEARCH", [utility.get_value(inc) for inc in self.includes])
        engine.set_target_variable(imported_tlbs, "SEARCH", [utility.get_value(inc) for inc in self.includes])

        get_manager().scanners().propagate(
            type.get_scanner("CPP", PropertySet(self.includes)), included_angle + included_quoted
        )
        get_manager().scanners().propagate(self, imported)


scanner.register(MidlScanner, "include")
type.set_scanner("IDL", MidlScanner)


# Command line options
feature("midl-stubless-proxy", ["yes", "no"], ["propagated"])
feature("midl-robust", ["yes", "no"], ["propagated"])

flags("midl.compile.idl", "MIDLFLAGS", ["<midl-stubless-proxy>yes"], ["/Oicf"])
flags("midl.compile.idl", "MIDLFLAGS", ["<midl-stubless-proxy>no"], ["/Oic"])
flags("midl.compile.idl", "MIDLFLAGS", ["<midl-robust>yes"], ["/robust"])
flags("midl.compile.idl", "MIDLFLAGS", ["<midl-robust>no"], ["/no_robust"])

# Architecture-specific options
architecture_x86 = ["<architecture>", "<architecture>x86"]
address_model_32 = ["<address-model>", "<address-model>32"]
address_model_64 = ["<address-model>", "<address-model>64"]

flags("midl.compile.idl", "MIDLFLAGS", [ar + "/" + m for ar in architecture_x86 for m in address_model_32], ["/win32"])
flags("midl.compile.idl", "MIDLFLAGS", [ar + "/<address-model>64" for ar in architecture_x86], ["/x64"])
flags("midl.compile.idl", "MIDLFLAGS", ["<architecture>ia64/" + m for m in address_model_64], ["/ia64"])
コード例 #20
0
ファイル: property.py プロジェクト: LocutusOfBorg/poedit
from b2.build import feature
from b2.util import sequence, qualify_jam_action, is_iterable_typed
import b2.util.set
from b2.manager import get_manager


__re_two_ampersands = re.compile ('&&')
__re_comma = re.compile (',')
__re_split_condition = re.compile ('(.*):(<.*)')
__re_split_conditional = re.compile (r'(.+):<(.+)')
__re_colon = re.compile (':')
__re_has_condition = re.compile (r':<')
__re_separate_condition_and_property = re.compile (r'(.*):(<.*)')

_not_applicable_feature='not-applicable-in-this-context'
feature.feature(_not_applicable_feature, [], ['free'])

__abbreviated_paths = False


class PropertyMeta(type):
    """
    This class exists to implement the isinstance() and issubclass()
    hooks for the Property class. Since we've introduce the concept of
    a LazyProperty, isinstance(p, Property) will fail when p is a LazyProperty.
    Implementing both __instancecheck__ and __subclasscheck__ will allow
    LazyProperty instances to pass the isinstance() and issubclass check for
    the Property class.

    Additionally, the __call__ method intercepts the call to the Property
    constructor to ensure that calling Property with the same arguments
コード例 #21
0
ファイル: stage.py プロジェクト: Bandeira/sps
import b2.build.property as property
import b2.build.property_set as property_set
import b2.build.generators as generators
import b2.build.virtual_target as virtual_target

from b2.manager import get_manager
from b2.util.sequence import unique
from b2.util import bjam_signature

import b2.build.type

import os.path
import re
import types

feature.feature("install-dependencies", ["off", "on"], ["incidental"])
feature.feature("install-type", [], ["free", "incidental"])
feature.feature("install-source-root", [], ["free", "path"])
feature.feature("so-version", [], ["free", "incidental"])

# If 'on', version symlinks for shared libraries will not be created. Affects
# Unix builds only.
feature.feature("install-no-version-symlinks", ["on"], ["optional", "incidental"])


class InstallTargetClass(targets.BasicTarget):
    def update_location(self, ps):
        """If <location> is not set, sets it based on the project data."""

        loc = ps.get("location")
        if not loc:
コード例 #22
0
ファイル: midl.py プロジェクト: ash-github/FatCat-Server
        bjam.call('DEPENDS', [target], imported_tlbs)
        bjam.call('NOCARE', all + imported_tlbs)
        engine.set_target_variable(included_angle , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
        engine.set_target_variable(included_quoted, 'SEARCH', [utility.get_value(inc) for inc in self.includes])
        engine.set_target_variable(imported       , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
        engine.set_target_variable(imported_tlbs  , 'SEARCH', [utility.get_value(inc) for inc in self.includes])
        
        get_manager().scanners().propagate(type.get_scanner('CPP', PropertySet(self.includes)), included_angle + included_quoted)
        get_manager().scanners().propagate(self, imported)

scanner.register(MidlScanner, 'include')
type.set_scanner('IDL', MidlScanner)


# Command line options
feature('midl-stubless-proxy', ['yes', 'no'], ['propagated'] )
feature('midl-robust', ['yes', 'no'], ['propagated'] )

flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-stubless-proxy>yes'], ['/Oicf'     ])
flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-stubless-proxy>no' ], ['/Oic'      ])
flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-robust>yes'        ], ['/robust'   ])
flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-robust>no'         ], ['/no_robust'])

# Architecture-specific options
architecture_x86 = ['<architecture>' , '<architecture>x86']
address_model_32 = ['<address-model>', '<address-model>32']
address_model_64 = ['<address-model>', '<address-model>64']

flags('midl.compile.idl', 'MIDLFLAGS', [ar + '/' + m for ar in architecture_x86 for m in address_model_32 ], ['/win32'])
flags('midl.compile.idl', 'MIDLFLAGS', [ar + '/<address-model>64' for ar in architecture_x86], ['/x64'])
flags('midl.compile.idl', 'MIDLFLAGS', ['<architecture>ia64/' + m for m in address_model_64], ['/ia64'])
コード例 #23
0
ファイル: darwin.py プロジェクト: gleyba/yazik
                                             ('version', version))

    command = common.get_invocation_command('darwin', 'g++', command)

    common.handle_options('darwin', condition, command, options)

    gcc.init_link_flags('darwin', 'darwin', condition)


# Darwin has a different shared library suffix
type.set_generated_target_suffix('SHARED_LIB', ['<toolset>darwin'], 'dylib')

# we need to be able to tell the type of .dylib files
type.register_suffixes('dylib', 'SHARED_LIB')

feature.feature('framework', [], ['free'])

toolset.flags('darwin.compile', 'OPTIONS', '<link>shared', ['-dynamic'])
toolset.flags('darwin.compile', 'OPTIONS', None,
              ['-Wno-long-double', '-no-cpp-precomp'])
toolset.flags('darwin.compile.c++', 'OPTIONS', None, ['-fcoalesce-templates'])

toolset.flags('darwin.link', 'FRAMEWORK', '<framework>')

# This is flag is useful for debugging the link step
# uncomment to see what libtool is doing under the hood
# toolset.flags ('darwin.link.dll', 'OPTIONS', None, '[-Wl,-v'])

action.register('darwin.compile.cpp', None, [
    '$(CONFIG_COMMAND) $(ST_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) -framework$(_)$(FRAMEWORK) $(OPTIONS)'
])
コード例 #24
0
ファイル: builtin.py プロジェクト: Beman/build
def register_globals ():
    """ Registers all features and variants declared by this module.
    """

    # This feature is used to determine which OS we're on.
    # In future, this may become <target-os> and <host-os>
    # TODO: check this. Compatibility with bjam names? Subfeature for version?
    os = sys.platform
    feature.feature ('os', [os], ['propagated', 'link-incompatible'])


    # 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'])

    # Whether there is support for asynchronous EH (e.g. catching SEGVs).
    feature.feature ('asynch-exceptions', ['on', 'off'], ['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'])
    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 ('asmflags', [], ['free'])
    feature.feature ('linkflags', [], ['free'])
    feature.feature ('archiveflags', [], ['free'])
    feature.feature ('version', [], ['free'])
    
    feature.feature ('location-prefix', [], ['free'])

    feature.feature ('action', [], ['free'])

    
    # The following features are incidental, since
    # in themself they have no effect on build products.
    # Not making them incidental will result in problems in corner
    # cases, for example:
    # 
    #    unit-test a : a.cpp : <use>b ;
    #    lib b : a.cpp b ;
    # 
    # Here, if <use> is not incidental, we'll decide we have two 
    # targets for a.obj with different properties, and will complain.
    #
    # Note that making feature incidental does not mean it's ignored. It may
    # be ignored when creating the 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.feature('c++-template-depth',
        [str(i) for i in range(64,1024+1,64)] +
        [str(i) for i in range(20,1000+1,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'])
    
    
    # This is internal feature which holds the paths of all dependency
    # dynamic libraries. On Windows, it's needed so that we can all
    # those paths to PATH, when running applications.
    # On Linux, it's 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'])
    
    # 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'], ['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'],

        ['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'])


    variant ('debug', ['<optimization>off', '<debug-symbols>on', '<inlining>off', '<runtime-debugging>on'])
    variant ('release', ['<optimization>speed', '<debug-symbols>off', '<inlining>full', 
                         '<runtime-debugging>off', '<define>NDEBUG'])
    variant ('profile', ['release'], ['<profiling>on', '<debug-symbols>on'])
コード例 #25
0
ファイル: testing.py プロジェクト: ash-github/FatCat-Server
from b2.manager import get_manager
from b2.util import stem, bjam_signature
from b2.util.sequence import unique

import bjam

import re
import os.path
import sys

def init():
    pass

# Feature controling the command used to lanch test programs.
feature.feature("testing.launcher", [], ["free", "optional"])

feature.feature("test-info", [], ["free", "incidental"])
feature.feature("testing.arg", [], ["free", "incidental"])
feature.feature("testing.input-file", [], ["free", "dependency"])

feature.feature("preserve-test-targets", ["on", "off"], ["incidental", "propagated"])

# Register target types.
type.register("TEST", ["test"])
type.register("COMPILE", [], "TEST")
type.register("COMPILE_FAIL", [], "TEST")

type.register("RUN_OUTPUT", ["run"])
type.register("RUN", [], "TEST")
type.register("RUN_FAIL", [], "TEST")
コード例 #26
0
ファイル: builtin.py プロジェクト: AishwaryaDoosa/Boost1.49
def register_globals():
    """ Registers all features and variants declared by this module.
    """

    # This feature is used to determine which OS we're on.
    # In future, this may become <target-os> and <host-os>
    # TODO: check this. Compatibility with bjam names? Subfeature for version?
    os = sys.platform
    feature.feature('os', [os], ['propagated', 'link-incompatible'])

    # 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('debug-symbols', ['on', 'off'], ['propagated'])
    feature.feature('define', [], ['free'])
    feature.feature('include', [], ['free', 'path'])  #order-sensitive
    feature.feature('cflags', [], ['free'])
    feature.feature('cxxflags', [], ['free'])
    feature.feature('linkflags', [], ['free'])
    feature.feature('archiveflags', [], ['free'])
    feature.feature('version', [], ['free'])

    feature.feature('location-prefix', [], ['free'])

    feature.feature('action', [], ['free'])

    # The following features are incidental, since
    # in themself they have no effect on build products.
    # Not making them incidental will result in problems in corner
    # cases, for example:
    #
    #    unit-test a : a.cpp : <use>b ;
    #    lib b : a.cpp b ;
    #
    # Here, if <use> is not incidental, we'll decide we have two
    # targets for a.obj with different properties, and will complain.
    #
    # Note that making feature incidental does not mean it's ignored. It may
    # be ignored when creating the 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.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'])

    # This is internal feature which holds the paths of all dependency
    # dynamic libraries. On Windows, it's needed so that we can all
    # those paths to PATH, when running applications.
    # On Linux, it's 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'])

    # 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'],
                    ['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
            'i386',
            'i486',
            'i586',
            'i686',
            'pentium',
            'pentium-mmx',
            'pentiumpro',
            'pentium2',
            'pentium3',
            'pentium3m',
            'pentium-m',
            'pentium4',
            'pentium4m',
            'prescott',
            'nocona',
            'conroe',
            'conroe-xe',
            'conroe-l',
            'allendale',
            'mermon',
            'mermon-xe',
            'kentsfield',
            'kentsfield-xe',
            'penryn',
            'wolfdale',
            'yorksfield',
            'nehalem',
            'k6',
            'k6-2',
            'k6-3',
            'athlon',
            'athlon-tbird',
            'athlon-4',
            'athlon-xp',
            'athlon-mp',
            'k8',
            'opteron',
            'athlon64',
            'athlon-fx',
            'winchip-c6',
            'winchip2',
            'c3',
            'c3-2',

            # 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'
        ],
        ['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'])

    variant('debug', [
        '<optimization>off', '<debug-symbols>on', '<inlining>off',
        '<runtime-debugging>on'
    ])
    variant('release', [
        '<optimization>speed', '<debug-symbols>off', '<inlining>full',
        '<runtime-debugging>off', '<define>NDEBUG'
    ])
    variant('profile', ['release'], ['<profiling>on', '<debug-symbols>on'])

    type.register('H', ['h'])
    type.register('HPP', ['hpp'], 'H')
    type.register('C', ['c'])
コード例 #27
0
import b2.build.property as property
import b2.build.property_set as property_set
import b2.build.generators as generators
import b2.build.virtual_target as virtual_target

from b2.manager import get_manager
from b2.util.sequence import unique
from b2.util import bjam_signature

import b2.build.type

import os.path
import re
import types

feature.feature('install-dependencies', ['off', 'on'], ['incidental'])
feature.feature('install-type', [], ['free', 'incidental'])
feature.feature('install-source-root', [], ['free', 'path'])
feature.feature('so-version', [], ['free', 'incidental'])

# If 'on', version symlinks for shared libraries will not be created. Affects
# Unix builds only.
feature.feature('install-no-version-symlinks', ['on'], ['optional', 'incidental'])

class InstallTargetClass(targets.BasicTarget):

    def update_location(self, ps):
        """If <location> is not set, sets it based on the project data."""

        loc = ps.get('location')
        if not loc:
コード例 #28
0
            [utility.get_value(inc) for inc in self.includes])
        engine.set_target_variable(
            imported_tlbs, 'SEARCH',
            [utility.get_value(inc) for inc in self.includes])

        get_manager().scanners().propagate(
            type.get_scanner('CPP', PropertySet(self.includes)),
            included_angle + included_quoted)
        get_manager().scanners().propagate(self, imported)


scanner.register(MidlScanner, 'include')
type.set_scanner('IDL', MidlScanner)

# Command line options
feature('midl-stubless-proxy', ['yes', 'no'], ['propagated'])
feature('midl-robust', ['yes', 'no'], ['propagated'])

flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-stubless-proxy>yes'], ['/Oicf'])
flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-stubless-proxy>no'], ['/Oic'])
flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-robust>yes'], ['/robust'])
flags('midl.compile.idl', 'MIDLFLAGS', ['<midl-robust>no'], ['/no_robust'])

# Architecture-specific options
architecture_x86 = ['<architecture>', '<architecture>x86']
address_model_32 = ['<address-model>', '<address-model>32']
address_model_64 = ['<address-model>', '<address-model>64']

flags('midl.compile.idl', 'MIDLFLAGS',
      [ar + '/' + m for ar in architecture_x86 for m in address_model_32],
      ['/win32'])
コード例 #29
0
ファイル: pch.py プロジェクト: ibrahim01832891988/ssh-rd
#      ;
#
# Add cpp-pch to sources:
#
#    exe hello
#      : main.cpp hello.cpp mypch
#      ;

from b2.build import type, feature, generators

type.register("PCH", ["pch"])
type.register("C_PCH", [], "PCH")
type.register("CPP_PCH", [], "PCH")

# Control precompiled header (PCH) generation.
feature.feature("pch", ["on", "off"], ["propagated"])

feature.feature("pch-header", [], ["free", "dependency"])
feature.feature("pch-file", [], ["free", "dependency"])


class PchGenerator(generators.Generator):
    """
        Base PCH generator. The 'run' method has the logic to prevent this generator
        from being run unless it's being used for a top-level PCH target.
    """

    def action_class(self):
        return "compile-action"

    def run(self, project, name, prop_set, sources):
コード例 #30
0
ファイル: builtin.py プロジェクト: pombredanne/mcsema
def register_globals():
    """ Registers all features and variants declared by this module.
    """

    # This feature is used to determine which OS we're on.
    # In future, this may become <target-os> and <host-os>
    # TODO: check this. Compatibility with bjam names? Subfeature for version?
    os = sys.platform
    feature.feature("os", [os], ["propagated", "link-incompatible"])

    # 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"])

    # Whether there is support for asynchronous EH (e.g. catching SEGVs).
    feature.feature("asynch-exceptions", ["on", "off"], ["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"])
    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("asmflags", [], ["free"])
    feature.feature("linkflags", [], ["free"])
    feature.feature("archiveflags", [], ["free"])
    feature.feature("version", [], ["free"])

    feature.feature("location-prefix", [], ["free"])

    feature.feature("action", [], ["free"])

    # The following features are incidental, since
    # in themself they have no effect on build products.
    # Not making them incidental will result in problems in corner
    # cases, for example:
    #
    #    unit-test a : a.cpp : <use>b ;
    #    lib b : a.cpp b ;
    #
    # Here, if <use> is not incidental, we'll decide we have two
    # targets for a.obj with different properties, and will complain.
    #
    # Note that making feature incidental does not mean it's ignored. It may
    # be ignored when creating the 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.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"])

    # This is internal feature which holds the paths of all dependency
    # dynamic libraries. On Windows, it's needed so that we can all
    # those paths to PATH, when running applications.
    # On Linux, it's 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"])

    # 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"], ["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
            "i386",
            "i486",
            "i586",
            "i686",
            "pentium",
            "pentium-mmx",
            "pentiumpro",
            "pentium2",
            "pentium3",
            "pentium3m",
            "pentium-m",
            "pentium4",
            "pentium4m",
            "prescott",
            "nocona",
            "conroe",
            "conroe-xe",
            "conroe-l",
            "allendale",
            "mermon",
            "mermon-xe",
            "kentsfield",
            "kentsfield-xe",
            "penryn",
            "wolfdale",
            "yorksfield",
            "nehalem",
            "k6",
            "k6-2",
            "k6-3",
            "athlon",
            "athlon-tbird",
            "athlon-4",
            "athlon-xp",
            "athlon-mp",
            "k8",
            "opteron",
            "athlon64",
            "athlon-fx",
            "winchip-c6",
            "winchip2",
            "c3",
            "c3-2",
            # 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",
        ],
        ["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"])

    variant("debug", ["<optimization>off", "<debug-symbols>on", "<inlining>off", "<runtime-debugging>on"])
    variant(
        "release",
        ["<optimization>speed", "<debug-symbols>off", "<inlining>full", "<runtime-debugging>off", "<define>NDEBUG"],
    )
    variant("profile", ["release"], ["<profiling>on", "<debug-symbols>on"])
コード例 #31
0
import b2.util.regex as regex
import b2.util.set as set

from b2.build.alias import AliasTarget, alias
from b2.tools.message import message

from b2.manager import get_manager
from b2.util import bjam_signature, value_to_jam
from b2.util.sequence import unique

import sys
import os

# FIXME: temporary fix until I port the xsltproc module
feature.feature("xsl:param", [], ["free"])

##############################################################################
#
# 0. General setup. Parse options, check them.
#
##############################################################################

BOOST_ROOT = get_manager().projects().loaded_tool_module_path_[__name__]

print "HERE I AM"


@bjam_signature((["version"], ))
def set_version(version):
    global BOOST_VERSION, BOOST_VERSION_TAG
コード例 #32
0
ファイル: package.py プロジェクト: Bandeira/sps
import b2.build.feature as feature
import b2.build.property as property
import b2.util.option as option
import b2.tools.stage as stage

from b2.build.alias import alias

from b2.manager import get_manager

from b2.util import bjam_signature
from b2.util.utility import ungrist


import os

feature.feature("install-default-prefix", [], ["free", "incidental"])

@bjam_signature((["name", "package_name", "?"], ["requirements", "*"],
                 ["binaries", "*"], ["libraries", "*"], ["headers", "*"]))
def install(name, package_name=None, requirements=[], binaries=[], libraries=[], headers=[]):

    requirements = requirements[:]
    binaries = binaries[:]
    libraries

    if not package_name:
        package_name = name

    if option.get("prefix"):
        # If --prefix is explicitly specified on the command line,
        # then we need wipe away any settings of libdir/includir that
コード例 #33
0
ファイル: property.py プロジェクト: zjutjsj1004/third
from b2.util.utility import *
from b2.build import feature
from b2.util import sequence, qualify_jam_action, is_iterable_typed
import b2.util.set
from b2.manager import get_manager

__re_two_ampersands = re.compile("&&")
__re_comma = re.compile(",")
__re_split_condition = re.compile("(.*):(<.*)")
__re_split_conditional = re.compile(r"(.+):<(.+)")
__re_colon = re.compile(":")
__re_has_condition = re.compile(r":<")
__re_separate_condition_and_property = re.compile(r"(.*):(<.*)")

__not_applicable_feature = "not-applicable-in-this-context"
feature.feature(__not_applicable_feature, [], ["free"])

__abbreviated_paths = False


class Property(object):

    __slots__ = ("_feature", "_value", "_condition")

    def __init__(self, f, value, condition=[]):
        if type(f) == type(""):
            f = feature.get(f)
        # At present, single property has a single value.
        assert type(value) != type([])
        assert f.free() or value.find(":") == -1
        self._feature = f