2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 18:07:12 +01:00

Cache taskg_gen.idx by absolute path

This commit is contained in:
Thomas Nagy 2017-08-13 22:37:31 +02:00
parent 28846d6f34
commit 7874f8569f
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA

View File

@ -78,11 +78,12 @@ class task_gen(object):
# Provide a unique index per folder
# This is part of a measure to prevent output file name collisions
path = self.path.abspath()
try:
self.idx = self.bld.idx[self.path] = self.bld.idx.get(self.path, 0) + 1
self.idx = self.bld.idx[path] = self.bld.idx.get(path, 0) + 1
except AttributeError:
self.bld.idx = {}
self.idx = self.bld.idx[self.path] = 1
self.idx = self.bld.idx[path] = 1
# Record the global task generator count
try: