2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 12:22:17 +00:00

Use toolset.requirements in targets.py

[SVN r63927]
This commit is contained in:
Vladimir Prus
2010-07-12 15:11:13 +00:00
parent 81388ba07f
commit 64cdf92a0d
2 changed files with 7 additions and 6 deletions

View File

@@ -77,7 +77,7 @@ import os.path
import sys
from b2.util.utility import *
import property, project, virtual_target, property_set, feature, generators
import property, project, virtual_target, property_set, feature, generators, toolset
from virtual_target import Subvariant
from b2.exceptions import *
from b2.util.sequence import unique
@@ -142,8 +142,7 @@ class TargetRegistry:
main target
'project' is the project where the main taret is to be declared."""
# FIXME: revive after toolset.requirements are ported.
#specification.append(toolset.requirements)
specification.extend(toolset.requirements())
requirements = property_set.refine_from_user_input(
project.get("requirements"), specification,
@@ -1252,7 +1251,7 @@ class TypedTarget (BasicTarget):
# Are there any top-level generators for this type/property set.
if not generators.find_viable_generators (self.type_, prop_set):
print "error: no generators were found for type '$(self.type)'"
print "error: no generators were found for type '" + self.type_ + "'"
print "error: and the requested properties"
print "error: make sure you've configured the needed tools"
print "See http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html"

View File

@@ -10,7 +10,7 @@
""" Support for toolset definition.
"""
import feature, property, generators
import feature, property, generators, property_set
from b2.util.utility import *
from b2.util import set
@@ -369,6 +369,8 @@ def __add_flag (rule_or_module, variable_name, condition, values):
__module_flags.setdefault(m, []).append(f)
__flags.setdefault(rule_or_module, []).append(f)
__requirements = []
def requirements():
"""Return the list of global 'toolset requirements'.
Those requirements will be automatically added to the requirements of any main target."""
@@ -380,9 +382,9 @@ def add_requirements(requirements):
they were specified literally. For best results, all requirements added should
be conditional or indirect conditional."""
# FIXME:
#if ! $(.ignore-requirements)
#{
print "XXXX", requirements
__requirements.extend(requirements)
#}