Hi,

I have a library project where some classes for legacy reasons have to exist twice, once global and once in a namespace.
Now I'm trying to migrate this project to qmake but the qmake generated Makefile is missing rules for half of the source files.

My project consists of files like class.cpp, containing the implementation of the class, and ns_class.cpp looking like
Qt Code:
  1. namespace mynamespace {
  2.  
  3. #include "class.cpp"
  4.  
  5. }
To copy to clipboard, switch view to plain text mode 

My .pro file contains
Qt Code:
  1. SOURCES += class.cpp ns_class.cpp
To copy to clipboard, switch view to plain text mode 
but the generated Makefile only has rules for ns_class.o, depending on ns_class.cpp and class.cpp. Dependy tracking or something seems to filter out the class.o/class.cpp rules.

Have I missed something obvious? What can I do to make qmake regard the class.cpp as independent source file?