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

Introduce 'toolset requirements'

[SVN r36076]
This commit is contained in:
Vladimir Prus
2006-11-18 18:34:42 +00:00
parent be5b9377d6
commit 9c65d5b982
2 changed files with 19 additions and 0 deletions

View File

@@ -82,6 +82,7 @@ import path ;
import set ;
import assert ;
import indirect ;
import toolset ;
# Base class for all abstract targets.
class abstract-target
@@ -1408,6 +1409,8 @@ rule main-target-requirements (
: project # Project where the main target is to be declared
)
{
specification += [ toolset.requirements ] ;
local requirements = [ property-set.refine-from-user-input
[ $(project).get requirements ] : $(specification) :
[ $(project).project-module ] : [ $(project).get location ] ] ;

View File

@@ -465,7 +465,23 @@ rule inherit-rules ( toolset : base )
IMPORT $(toolset) : $(rules) : : $(toolset).$(rules) ;
}
# Return the list of global 'toolset requirements'.
# Those requirements will be automatically added to
# the requirements of any main target.
rule requirements ( )
{
return $(.requirements) ;
}
# Adds elements to the list of global 'toolset requirements'.
# The requirements will be automatically added to the requirements
# for all main targets, as if they were specified literally.
# For best results, all requirements added should be conditional or
# indirect conditional.
rule add-requirements ( requirements * )
{
.requirements += $(requirements) ;
}
local rule __test__ ( )
{