Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9
-
None
-
Windows MSVC 2015
-
a12a3c6c8c07c0fe52589cea473ac95e556052c7
Description
1b46872cde7fb50652f55bfe1e286e6af5124200 which fixed another bug, introduced a different regression:
If any qmake project has SOURCES empty (could be different, but this is the symptom I saw), for example it is calling a doxygen command but not really building a library, the created makefile is broken. This was perfectly working before the above commit.
Minimal example:
TEMPLATE = lib CONFIG += staticlib CONFIG -= qt isEmpty(DOXYGEN_BIN) { message("Doxygen not found") } else { # Doxygen command simplified for QTBUG report doxy.commands = echo test doxy.CONFIG = no_link target_predeps doxy.depends = $$PWD/$$DOXYFILE doxy.input = DOXY_INPUT doxy.name = DOXY doxy.output = html/index.html QMAKE_EXTRA_COMPILERS += doxy }
produces a broken makefile (the list of objects does not exist and make tries to interpret the lines below as objects)
$(DESTDIR_TARGET): $(OBJECTS) $(LIBAPP) $(LIBFLAGS) /OUT:$(DESTDIR_TARGET) @<< <<
which does not properly finish the block.
With 5.8 or reverting the above commit produces
$(DESTDIR_TARGET): $(OBJECTS) $(LIBAPP) $(LIBFLAGS) /OUT:$(DESTDIR_TARGET) @<< $(OBJECTS) <<
Workaround is to add a dummy cpp file to SOURCES which is ok sometimes and does not work in all cases. People with a similar use case might run into strange build errors and it is not easy to spot why.
Attachments
For Gerrit Dashboard: QTBUG-59305 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
187578,2 | Fix MSVC Makefiles when SOURCES is empty | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |