qt5base-lts/qmake
Joerg Bornemann 6a221f3d05 Fix qmake's detection for conflicting source files for nmake
Consider the following source tree:
  foo/narf.cpp
  bar/narf.c
  bar/gnampf.cpp

The .pro file has
  SOURCES += foo/narf.cpp bar/gnampf.cpp
The file bar/narf.c is not supposed to be built for whatever reason.

QMake's nmake Makefile generator generates inference rules of the form

  {.\foo}.cpp{debug\}.obj::
  ...

for every source subdirectory and every source file extension.
Thus, we have

  {.\foo}.cpp{debug\}.obj::
  {.\bar}.cpp{debug\}.obj::
  {.\bar}.c{debug\}.obj::

Depending on the exact execution order of the inference rules (which
depends on the names of the files) the latter rule might get picked,
and we're erronously compiling bar/narf.c even though it's not
referenced in the .pro file.

Conclusion: QMake's detection of conflicting source files must
consider the base names of source files, and not the exact file names.

Fixes: QTBUG-72059
Change-Id: I50c2725ae2a7421053369a10680230f571af00ea
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-10 06:46:15 +00:00
..
doc Doc: Add description for mode argument of qmake's $$system() 2018-11-02 12:40:59 +00:00
generators Fix qmake's detection for conflicting source files for nmake 2018-12-10 06:46:15 +00:00
library Fix crash in qmake parsing 2018-11-29 07:46:02 +00:00
cachekeys.h Updated license headers 2016-01-21 18:55:18 +00:00
main.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
Makefile.unix Merge remote-tracking branch 'origin/5.11' into 5.12 2018-11-09 10:34:33 +01:00
Makefile.unix.macos Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
Makefile.unix.mingw fix "make clean" of qmake in a builddir with spaces on mingw 2017-12-14 18:06:31 +00:00
Makefile.unix.unix Move the readlink(2) wrapper to qcore_unix.cpp 2017-07-08 02:18:16 +00:00
Makefile.unix.win32 Fix builds with some MinGW distributions 2018-08-02 07:10:00 +00:00
Makefile.win32 Merge remote-tracking branch 'origin/5.11' into 5.12 2018-11-09 10:34:33 +01:00
meta.cpp qmake: refactor QMakeMetaInfo::findLib() interface 2018-07-16 15:44:23 +00:00
meta.h qmake: refactor QMakeMetaInfo::findLib() interface 2018-07-16 15:44:23 +00:00
option.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
option.h qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
project.cpp qmake: make argument validation of built-ins data driven 2018-06-27 17:23:57 +00:00
project.h Merge remote-tracking branch 'origin/5.7' into dev 2016-07-19 20:14:40 +02:00
property.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
property.h move generation of qconfig.cpp (and qt.conf) to qmake-based configure 2016-12-13 18:56:12 +00:00
qmake_pch.h Updated license headers 2016-01-21 18:55:18 +00:00
qmake-aux.pro revert to building qmake with qconfig.cpp 2017-01-06 20:09:08 +00:00
qmake.pro Modernize the "textcodec" feature 2018-11-07 13:19:54 +00:00