Too smart qmake
-
I have a header in project:
@
//fn_names.h
#define FN_NAME foo
#define FN_WNAME wfoo
@And c-file where is foo/wfoo implemented as:
@
//foo_impl.c#include "fn_names.h"
void
#ifdef W
FN_WNAME
#else
FN_NAME
#endif
() {}
@For get in output library this function with to different names I have a file:
@
//w.c#define W //compile w-function
#include "foo_impl.c"
@If I use for example (MSVC (visual studio)) it compile w.c and foo_impl.c files separetly.
As result I have
w.obj — with: wfoo()
and foo_impl.obj with foo()
(same function but with two different names)But! When I use *.pro file I describe it like:
@
SOURCES +=
w.c
foo_impl.c
@BUT qmake generate (eliminate foo_impl.c from ) the Makefile without separate compilation for foo_impl.c only for w.c
How to disable this behavior?
Thanks. -
Post bug and my fixes here: https://bugreports.qt-project.org/browse/QTBUG-32993