I have a QT project with some sub projects like this:
Qt Code:
  1. main/
  2. main.pro
  3. sub1/
  4. include/
  5. src/
  6. s1.cpp
  7. sub1.pro
  8. sub2/
  9. sub2.pro
To copy to clipboard, switch view to plain text mode 
I generate the makefiles with qmake -r from the top. qmake is then generating Makefiles for main.pro, sub1.pro and sub2.pro. Because qmake uses relative paths the paths within the Makefiles of sub1 and sub2 are relatively to the pro files. This causes clang to print relative paths when referring to source code files within error messages:
Qt Code:
  1. src/s1.cpp:22:13: error: expected '('
To copy to clipboard, switch view to plain text mode 
And seen from the project directory src/s1.cpp doesn't exist. At least the path should be sub1/src/s1.cpp.
Another solution would be to force qmake to generate absolute paths in the Makefile but I can't find a way to do that.
Any idea?