qmake: Avoid writing glue project file when only generating prl files

When qmake is run with -prl we don't need to write the glue makefile,
and doing so will end up with MakefileGenerator::writeProjectMakefile
trying to write to an invalid Option::output, resulting in warnings:

  QIODevice::write device not open

Change-Id: I196b185570e7329c621c2ccb8530b43f4be51ee6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-10-02 16:53:45 +02:00
parent 0683de205f
commit 9115c7ae45

View File

@ -141,7 +141,8 @@ bool
BuildsMetaMakefileGenerator::write() BuildsMetaMakefileGenerator::write()
{ {
Build *glue = nullptr; Build *glue = nullptr;
if(!makefiles.isEmpty() && !makefiles.first()->build.isNull()) { if(!makefiles.isEmpty() && !makefiles.first()->build.isNull()
&& Option::qmake_mode != Option::QMAKE_GENERATE_PRL) {
glue = new Build; glue = new Build;
glue->name = name; glue->name = name;
glue->makefile = createMakefileGenerator(project, true); glue->makefile = createMakefileGenerator(project, true);