qt5base-lts/qmake/generators
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
..
mac qmake: make sure QMAKE_LIBS{,_PRIVATE} comes after LIBS{,_PRIVATE} 2018-10-12 18:06:33 +00:00
unix qmake: fix .prl file generation for bundles 2018-11-07 10:32:52 +00:00
win32 Fix qmake's detection for conflicting source files for nmake 2018-12-10 06:46:15 +00:00
makefile.cpp qmake: Escape '=' in dependency paths for unix make 2018-11-30 14:47:42 +00:00
makefile.h qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
makefiledeps.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
makefiledeps.h qmake: replace a uint:1 with a bool 2016-08-15 22:16:09 +00:00
metamakefile.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
metamakefile.h qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
projectgenerator.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
projectgenerator.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00
xmloutput.cpp Merge remote-tracking branch 'origin/5.6' into dev 2016-02-11 08:25:04 +01:00
xmloutput.h Updated license headers 2016-01-21 18:55:18 +00:00