示例#1
0
 def run(self, project, name, prop_set, sources):
     if not name:
         # Unless this generator is invoked as the top-most generator for a
         # main target, fail. This allows using 'H' type as input type for
         # this generator, while preventing Boost.Build to try this generator
         # when not explicitly asked for.
         #
         # One bad example is msvc, where pch generator produces both PCH
         # target and OBJ target, so if there's any header generated (like by
         # bison, or by msidl), we'd try to use pch generator to get OBJ from
         # that H, which is completely wrong. By restricting this generator
         # only to pch main target, such problem is solved.
         pass
     else:
         r = self.run_pch(project, name, prop_set.add_raw("<define>BOOST_BUILD_PCH_ENABLED"), sources)
         return generators.add_usage_requirements(r, ["<define>BOOST_BUILD_PCH_ENABLED"])
示例#2
0
文件: pch.py 项目: malinost/boost
 def run(self, project, name, prop_set, sources):
     if not name:
         # Unless this generator is invoked as the top-most generator for a
         # main target, fail. This allows using 'H' type as input type for
         # this generator, while preventing Boost.Build to try this generator
         # when not explicitly asked for.
         #
         # One bad example is msvc, where pch generator produces both PCH
         # target and OBJ target, so if there's any header generated (like by
         # bison, or by msidl), we'd try to use pch generator to get OBJ from
         # that H, which is completely wrong. By restricting this generator
         # only to pch main target, such problem is solved.
         pass
     else:
         r = self.run_pch(
             project, name,
             prop_set.add_raw('<define>BOOST_BUILD_PCH_ENABLED'), sources)
         return generators.add_usage_requirements(
             r, ['<define>BOOST_BUILD_PCH_ENABLED'])