qt5base-lts/qmake/generators/win32
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
..
mingw_make.cpp qmake: make sure QMAKE_LIBS{,_PRIVATE} comes after LIBS{,_PRIVATE} 2018-10-12 18:06:33 +00:00
mingw_make.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00
msbuild_objectmodel.cpp Merge remote-tracking branch 'origin/5.11' into dev 2018-08-16 18:48:59 +02:00
msbuild_objectmodel.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00
msvc_nmake.cpp Fix qmake's detection for conflicting source files for nmake 2018-12-10 06:46:15 +00:00
msvc_nmake.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00
msvc_objectmodel.cpp Merge remote-tracking branch 'origin/5.11' into 5.12 2018-09-30 01:00:19 +02:00
msvc_objectmodel.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00
msvc_vcproj.cpp Revert "Revert "qmake: Work around MSVC compiler bug."" 2018-11-09 21:43:30 +00:00
msvc_vcproj.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00
msvc_vcxproj.cpp Updated license headers 2016-01-21 18:55:18 +00:00
msvc_vcxproj.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00
registry_p.h move "shared" registry reading code into qmake 2016-12-23 13:45:50 +00:00
registry.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
winmakefile.cpp qmake: make sure QMAKE_LIBS{,_PRIVATE} comes after LIBS{,_PRIVATE} 2018-10-12 18:06:33 +00:00
winmakefile.h qmake: Apply modernize-use-override 2018-08-08 17:30:23 +00:00