From 8722191e44450c47dbc9dabe54c3fd7baad4583d Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Mon, 10 Aug 2020 21:16:06 +0200 Subject: [PATCH] Fix playground/pch's second example --- playground/pch/wscript | 2 +- waflib/extras/pch.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playground/pch/wscript b/playground/pch/wscript index 0331618d..9cbd556b 100644 --- a/playground/pch/wscript +++ b/playground/pch/wscript @@ -53,7 +53,7 @@ def build(bld): source = 'a.cpp', use = 'BOOST') - bld.program( + bld(features = 'cxx cxxprogram pch', target = 'test1', source = 'b.cpp c.cpp main.cpp', use = 'base-with-pch') diff --git a/waflib/extras/pch.py b/waflib/extras/pch.py index 103e7528..b44c7a2e 100644 --- a/waflib/extras/pch.py +++ b/waflib/extras/pch.py @@ -90,7 +90,7 @@ def apply_pch(self): if getattr(self, 'name', None): 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)) except KeyError: pass @@ -104,7 +104,7 @@ def apply_pch(self): self.pch_task = task 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.after_method('process_source', 'propagate_uselib_vars')