Qmake writes same named cpp files in one object file
Two cpp files with same name get written in the same object file by qmake.
Is it possible to fix this without renaming the files?
qmake does not create object files.
It indeed doesn't, but qmake specifies them to be written in the same object file. qmake generates a make file which uses cpp/hpp filenames for object files' names.
It would be nice if there was an option for qmake to generate make file with object files being created not in a single directory, as it is by default, but rather preserving source files' directory tree.
Or just dump all object files in one directory as it does now, but uniquely identify them, for example, by perpending namespaces to the filename of object files.