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:
@@ -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 ] ] ;
|
||||
|
||||
@@ -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__ ( )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user