Fix playground/pch's second example

This commit is contained in:
Thomas Nagy 2020-08-10 21:16:06 +02:00
parent a168e28ec8
commit 43ce688cdf
2 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ def build(bld):
source = 'a.cpp', source = 'a.cpp',
use = 'BOOST') use = 'BOOST')
bld.program( bld(features = 'cxx cxxprogram pch',
target = 'test1', target = 'test1',
source = 'b.cpp c.cpp main.cpp', source = 'b.cpp c.cpp main.cpp',
use = 'base-with-pch') use = 'base-with-pch')

View File

@ -90,7 +90,7 @@ def apply_pch(self):
if getattr(self, 'name', None): if getattr(self, 'name', None):
try: try:
task = self.bld.pch_tasks["%s.%s" % (self.name, self.idx)] task = self.bld.pch_tasks[self.name]
self.bld.fatal("Duplicated 'pch' task with name %r" % "%s.%s" % (self.name, self.idx)) self.bld.fatal("Duplicated 'pch' task with name %r" % "%s.%s" % (self.name, self.idx))
except KeyError: except KeyError:
pass pass
@ -104,7 +104,7 @@ def apply_pch(self):
self.pch_task = task self.pch_task = task
if getattr(self, 'name', None): if getattr(self, 'name', None):
self.bld.pch_tasks["%s.%s" % (self.name, self.idx)] = task self.bld.pch_tasks[self.name] = task
@TaskGen.feature('cxx') @TaskGen.feature('cxx')
@TaskGen.after_method('process_source', 'propagate_uselib_vars') @TaskGen.after_method('process_source', 'propagate_uselib_vars')