mirror of
https://github.com/boostorg/build.git
synced 2026-02-19 14:22:10 +00:00
Cleaned up how Boost Build's generator selection implementation updates its cached information when a new target type is defined.
[SVN r48649]
This commit is contained in:
@@ -60,12 +60,13 @@ if "--debug-generators" in [ modules.peek : ARGV ]
|
||||
|
||||
|
||||
# Updated cached viable source target type information as needed after a new
|
||||
# derived target type gets added. This is needed because if a target type is a
|
||||
# viable source target type for some generator then all of the target type's
|
||||
# derived target types are automatically viable as source target types for the
|
||||
# same generator. Does nothing if a non-derived target type is passed to it.
|
||||
# target type gets defined. This is needed because if a target type is a viable
|
||||
# source target type for some generator then all of the target type's derived
|
||||
# target types should automatically be considered as viable source target types
|
||||
# for the same generator as well. Does nothing if a non-derived target type is
|
||||
# passed to it.
|
||||
#
|
||||
rule update-viable-source-target-type-cache-with-derived-type ( type )
|
||||
rule update-cached-information-with-a-new-type ( type )
|
||||
{
|
||||
local base-type = [ type.base $(type) ] ;
|
||||
if $(base-type)
|
||||
|
||||
@@ -80,11 +80,7 @@ rule register ( type : suffixes * : base-type ? )
|
||||
# Adding a new derived type affects generator selection so we need to
|
||||
# make the generator selection module update any of its cached
|
||||
# information related to a new derived type being defined.
|
||||
if $(base-type)
|
||||
{
|
||||
generators.update-viable-source-target-type-cache-with-derived-type
|
||||
$(type) ;
|
||||
}
|
||||
generators.update-cached-information-with-a-new-type $(type) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user