QMAKE_CXXFLAGS
are applied when compiling .cpp files, but not applied to .mm files. Which flag should I use instead?
Those flags belong in QMAKE_OBJECTIVE_CFLAGS
(not QMAKE_OBJECTIVE_CXXFLAGS
).
The flags used in precompiled header generation go into QMAKE_OBJCXXFLAGS_PRECOMPILE
,
Objective-C compilation is handled by qtbase/mkspecs/features/mac/objective_c.prf
. An objective_c
compiler is defined on-the-fly when Objective C/C++ sources are present. You can glean other details there.
The precompilation flags are handled by the Unix makefile generator: qtbase/qmake/generators/unix/unixmake.cpp
and unixmake2.cpp
.
I offer no comment as to the consistency of those variable names and their locus of implementation. Don't shoot the messenger.