On Tue, 3 Dec 2019 16:49:05 +0100
"Olivier B." <perso.olivier.barthel...@gmail.com> wrote:

> I encountered an issue with QtCreator after a minor modif of my project file
> 
> I added in a pri include file a few lines that look like :
> SOME_VAR = $$files($$SOME_OTHER_VAR/*, true)
> 
> That particular pri file is included under a condition, so it is
> actually included only in a 'automated' build, i order to speed up
> qmake for normal developper that just run 'make' and don't need to
> ruin 'make install'
> A 'qmake -r' runs fine in an automated build that is expected to parse
> the problematic lines, and in a user build that is expected to not
> enter the file
> However, because of those lines qtcreator seems to loop or be stuck,
> while the status tooltip says that it is scanning the root .pro file.
> This takes more and more memory until the computer stops responding
> 
> What i think is happening is that creator does an other scan for
> himself than the one qmake does, and is going through the include even
> though the condition to include it is false.

Yes, Creator evaluates also the "else" cases, in order to provide a complete 
view of the project (there might be SOURCES in there).

> But as it is not supposed
> to have parsed that file, it does not know the value of
> $$SOME_OTHER_VAR, so it is actually doing multiple recursive scans of
> /* (this is on linux) and storing that in variables
> 
> I validated with messages that qmake is not entering that pri file,
> and just commenting the $$files calls removes the problems.
> Same behaviour in versions 4.8 and 4.9
> 
> Any hints on how to avoid this issue?

You could set SOME_OTHER_VAR to a random default value that is unlikely to 
correspond to an actual path.


Christian
_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to