fightling
10th November 2015, 13:06
I have a QT project with some sub projects like this:
main/
main.pro
sub1/
include/
src/
s1.cpp
sub1.pro
sub2/
sub2.pro
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:
src/s1.cpp:22:13: error: expected '('
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?
main/
main.pro
sub1/
include/
src/
s1.cpp
sub1.pro
sub2/
sub2.pro
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:
src/s1.cpp:22:13: error: expected '('
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?