mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Fix conditionals_multiple.py test in Boost.Build/Python.
Patch from Georgy Gritsenko. [SVN r75109]
This commit is contained in:
@@ -557,10 +557,12 @@ def expand_composite(property):
|
||||
result.extend(expand_composite(p))
|
||||
return result
|
||||
|
||||
|
||||
@bjam_signature((['feature'], ['properties', '*']))
|
||||
def get_values (feature, properties):
|
||||
""" Returns all values of the given feature specified by the given property set.
|
||||
"""
|
||||
if feature[0] != '<':
|
||||
feature = '<' + feature + '>'
|
||||
result = []
|
||||
for p in properties:
|
||||
if get_grist (p) == feature:
|
||||
|
||||
@@ -68,7 +68,9 @@ def reset ():
|
||||
reset ()
|
||||
|
||||
# FIXME: --ignore-toolset-requirements
|
||||
# FIXME: using
|
||||
def using(toolset_module, *args):
|
||||
loaded_toolset_module= get_manager().projects().load_module(toolset_module, [os.getcwd()]);
|
||||
loaded_toolset_module.init(*args)
|
||||
|
||||
# FIXME push-checking-for-flags-module ....
|
||||
# FIXME: investigate existing uses of 'hack-hack' parameter
|
||||
|
||||
@@ -20,6 +20,7 @@ from b2.util.sequence import unique
|
||||
import b2.build.build_request
|
||||
from b2.build.errors import ExceptionWithUserContext
|
||||
import b2.tools.common
|
||||
from b2.build.toolset import using
|
||||
|
||||
import b2.build.project as project
|
||||
import b2.build.virtual_target as virtual_target
|
||||
@@ -381,7 +382,10 @@ def process_explicit_toolset_requests():
|
||||
|
||||
if debug_config:
|
||||
print "notice: [cmdline-cfg] toolset '%s' not previously configured; attempting to auto-configure now" % toolset_version
|
||||
toolset.using(toolset, version)
|
||||
if version is not None:
|
||||
using(toolset, version)
|
||||
else:
|
||||
using(toolset)
|
||||
|
||||
else:
|
||||
|
||||
|
||||
@@ -30,6 +30,13 @@ feature.extend toolset : testToolset ;
|
||||
rule init ( ) { }
|
||||
""")
|
||||
|
||||
t.write("testToolset.py", """
|
||||
from b2.build import feature
|
||||
feature.extend('toolset', ["testToolset"])
|
||||
def init ( ):
|
||||
pass
|
||||
""")
|
||||
|
||||
t.write("jamroot.jam", """
|
||||
import feature ;
|
||||
import notfile ;
|
||||
@@ -135,6 +142,14 @@ feature.subfeature toolset %(toolset)s : version : 0 1 ;
|
||||
rule init ( version ? ) { }
|
||||
""" % {"toolset": toolset})
|
||||
|
||||
t.write( "testToolset.py", """
|
||||
from b2.build import feature
|
||||
feature.extend('toolset', ["testToolset"])
|
||||
feature.subfeature('toolset',"testToolset","version",['0','1'])
|
||||
def init ( version ):
|
||||
pass
|
||||
""")
|
||||
|
||||
t.write("jamroot.jam", """
|
||||
import feature ;
|
||||
import notfile ;
|
||||
|
||||
Reference in New Issue
Block a user