MCPcopy Create free account
hub / github.com/boostorg/build / construct

Method construct

src/tools/cast.py:36–53  ·  view source on GitHub ↗
(self, name, source_targets, ps)

Source from the content-addressed store, hash-verified

34class CastTargetClass(targets.TypedTarget):
35
36 def construct(self, name, source_targets, ps):
37 assert isinstance(name, basestring)
38 assert is_iterable_typed(source_targets, virtual_target.VirtualTarget)
39 assert isinstance(ps, property_set.PropertySet)
40
41 result = []
42 for s in source_targets:
43 if not isinstance(s, virtual_target.FileTarget):
44 get_manager().errors()("Source to the 'cast' metatager is not a file")
45
46 if s.action():
47 get_manager().errors()("Only non-derived targets allowed as sources for 'cast'.")
48
49
50 r = s.clone_with_different_type(self.type())
51 result.append(get_manager().virtual_targets().register(r))
52
53 return property_set.empty(), result
54
55@bjam_signature((["name", "type"], ["sources", "*"], ["requirements", "*"],
56 ["default_build", "*"], ["usage_requirements", "*"]))

Callers

nothing calls this directly

Calls 7

is_iterable_typedFunction · 0.90
get_managerFunction · 0.90
errorsMethod · 0.80
appendMethod · 0.80
virtual_targetsMethod · 0.80
emptyMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected