magland
15th November 2007, 10:00
When qmake generates a make file, I think that it must specify which files depend on others, so that the compiler knows which source files need to be recompiled.
For example, suppose I have
HEADERS = foo.h bar.h
SOURCES = foo.cpp
and in foo.cpp, I have
#include "foo.h"
#include "bar.h"
...
If bar.h is modified, then foo.cpp is recompiled upon make.
Here's my question. What if I don't want bar.h to appear in the HEADERS variable? Then foo.cpp will not be recompiled when bar.h is modified :(. Is there a way for me to tell qmake to please look at bar.h --- but don't run moc on it?
For example, suppose I have
HEADERS = foo.h bar.h
SOURCES = foo.cpp
and in foo.cpp, I have
#include "foo.h"
#include "bar.h"
...
If bar.h is modified, then foo.cpp is recompiled upon make.
Here's my question. What if I don't want bar.h to appear in the HEADERS variable? Then foo.cpp will not be recompiled when bar.h is modified :(. Is there a way for me to tell qmake to please look at bar.h --- but don't run moc on it?