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

Class MsvcPchGenerator

v2/tools/msvc.py:537–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535################################################################################
536
537class MsvcPchGenerator(pch.PchGenerator):
538
539 # Inherit the __init__ method
540
541 def run_pch(self, project, name, prop_set, sources):
542 # Find the header in sources. Ignore any CPP sources.
543 pch_header = None
544 pch_source = None
545 for s in sources:
546 if type.is_derived(s.type(), 'H'):
547 pch_header = s
548 elif type.is_derived(s.type(), 'CPP') or type.is_derived(s.type(), 'C'):
549 pch_source = s
550
551 if not pch-header:
552 raise RuntimeError( "can not build pch without pch-header" )
553
554 # If we do not have the PCH source - that is fine. We will just create a
555 # temporary .cpp file in the action.
556 temp_prop_set = property_set.create([Property('pch-source',pch_source)]+prop_set.all())
557 generated = Generator.run(project,name,temp_prop_set,pch_header)
558 pch_file = None
559 for g in generated:
560 if type.is_derived(g.type(), 'PCH'):
561 pch_file = g
562 return property_set.create([Property('pch-header',pch_header),Property('pch-file',pch_file)]+generated)
563
564
565################################################################################

Callers 1

register_toolset_reallyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected