mirror of https://gitlab.com/ita1024/waf.git
Fix playground/pch's second example
This commit is contained in:
parent
a168e28ec8
commit
43ce688cdf
|
@ -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')
|
||||||
|
|
|
@ -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')
|
||||||
|
|
Loading…
Reference in New Issue