• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python feature.feature函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中b2.build.feature.feature函数的典型用法代码示例。如果您正苦于以下问题:Python feature函数的具体用法?Python feature怎么用?Python feature使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了feature函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __register_features

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"])
开发者ID:ibrahim01832891988,项目名称:ssh-rd,代码行数:9,代码来源:type.py


示例2: __register_features

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'])
开发者ID:Bandeira,项目名称:sps,代码行数:9,代码来源:type.py


示例3: init

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")
开发者ID:ash-github,项目名称:FatCat-Server,代码行数:30,代码来源:testing.py


示例4: header

# 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:
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:31,代码来源:pch.py


示例5: register_globals

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'])
#.........这里部分代码省略.........
开发者ID:Beman,项目名称:build,代码行数:101,代码来源:builtin.py


示例6: PropertyMeta

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
开发者ID:LocutusOfBorg,项目名称:poedit,代码行数:31,代码来源:property.py


示例7: get_manager

        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'])
开发者ID:ash-github,项目名称:FatCat-Server,代码行数:31,代码来源:midl.py


示例8: install

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
开发者ID:Bandeira,项目名称:sps,代码行数:31,代码来源:package.py


示例9:

    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)'])
开发者ID:Cabriter,项目名称:abelkhan,代码行数:30,代码来源:darwin.py


示例10: header

#      ;
#
# 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):
开发者ID:ibrahim01832891988,项目名称:ssh-rd,代码行数:31,代码来源:pch.py


示例11: get_manager

        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"])
开发者ID:kjedruczyk,项目名称:build,代码行数:31,代码来源:midl.py


示例12: InstallTargetClass

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:
开发者ID:Bandeira,项目名称:sps,代码行数:31,代码来源:stage.py


示例13: debug

# 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")        
开发者ID:ash-github,项目名称:FatCat-Server,代码行数:31,代码来源:boost.py


示例14: init

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)"')
开发者ID:zjutjsj1004,项目名称:third,代码行数:31,代码来源:mc.py


示例15: debug

# 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:
开发者ID:X-Plane,项目名称:xptools_msvc_libs,代码行数:31,代码来源:boost.py


示例16: SymlinkTarget

# 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.
开发者ID:zjutjsj1004,项目名称:third,代码行数:31,代码来源:symlink.py


示例17: set_version

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
开发者ID:AlexMioMio,项目名称:boost,代码行数:30,代码来源:boostcpp.py


示例18: register_globals

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 ;
#.........这里部分代码省略.........
开发者ID:pombredanne,项目名称:mcsema,代码行数:101,代码来源:builtin.py


示例19: Property

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
开发者ID:zjutjsj1004,项目名称:third,代码行数:31,代码来源:property.py



注:本文中的b2.build.feature.feature函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python generators.register函数代码示例发布时间:2022-05-24
下一篇:
Python azurerm.get_access_token函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap