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

Class CastTargetClass

v2/tools/cast.py:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32from b2.util import bjam_signature
33
34class CastTargetClass(targets.TypedTarget):
35
36 def construct(name, source_targets, ps):
37 result = []
38 for s in source_targets:
39 if not isinstance(s, virtual_targets.FileTarget):
40 get_manager().errors()("Source to the 'cast' metatager is not a file")
41
42 if s.action():
43 get_manager().errors()("Only non-derived targets allowed as sources for 'cast'.")
44
45
46 r = s.clone_with_different_type(self.type())
47 result.append(get_manager().virtual_targets().register(r))
48
49 return result
50
51
52@bjam_signature((["name", "type"], ["sources", "*"], ["requirements", "*"],

Callers 1

castFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected