mirror of https://gitlab.com/ita1024/waf.git
Prevent unnecessary rebuilds in the qt processing
A list was changed during iteration, causing an unnecessary dependency to be kept, and triggering subsequent rebuilds. This only occured with multiple .moc included.
This commit is contained in:
parent
8267e7ae97
commit
426637d10a
|
@ -9,6 +9,7 @@ NEW IN WAF 1.7.11
|
||||||
* Redundant check_dir call causing random uninstall failures #1313
|
* Redundant check_dir call causing random uninstall failures #1313
|
||||||
* Append to moc flags instead of replacing them #1317
|
* Append to moc flags instead of replacing them #1317
|
||||||
* Share moc tasks in the Qt processing #1318
|
* Share moc tasks in the Qt processing #1318
|
||||||
|
* Fixed a source of unnecessary rebuilds in the Qt processing
|
||||||
|
|
||||||
NEW IN WAF 1.7.10
|
NEW IN WAF 1.7.10
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
@ -115,14 +115,21 @@ class qxx(Task.classes['cxx']):
|
||||||
self.moc_done = 0
|
self.moc_done = 0
|
||||||
|
|
||||||
def scan(self):
|
def scan(self):
|
||||||
"""Re-use the C/C++ scanner, but remove the moc files from the dependencies"""
|
"""
|
||||||
|
Re-use the C/C++ scanner, but remove the moc files from the dependencies
|
||||||
|
since the .cpp file already depends on all the headers
|
||||||
|
"""
|
||||||
(nodes, names) = c_preproc.scan(self)
|
(nodes, names) = c_preproc.scan(self)
|
||||||
# for some reasons (variants) the moc node may end in the list of node deps
|
lst = []
|
||||||
for x in nodes:
|
for x in nodes:
|
||||||
|
# short lists, no need to use sets
|
||||||
if x.name.endswith('.moc'):
|
if x.name.endswith('.moc'):
|
||||||
nodes.remove(x)
|
s = x.path_from(self.inputs[0].parent.get_bld())
|
||||||
names.append(x.path_from(self.inputs[0].parent.get_bld()))
|
if s not in names:
|
||||||
return (nodes, names)
|
names.append(s)
|
||||||
|
else:
|
||||||
|
lst.append(x)
|
||||||
|
return (lst, names)
|
||||||
|
|
||||||
def runnable_status(self):
|
def runnable_status(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue