summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-02-14 16:08:00 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-02-23 07:51:50 +0000
commit6282948e96659bbf718ec1df29a8f7bb2a5db464 (patch)
treeffe16cc2acd47cbcd909a99b7f7d3b3745dfdb83 /mkspecs
parent8c1f147eaf2769f84fa5ae8425394eb315949395 (diff)
Add CONFIG += no_moc_predefs to allow one to escape problems
Sometimes, users need to add compiler flags to QMAKE_CXXFLAGS that aren't supposed to be passed to the predefs dump. That's especially true for -include options, as that would change completely what's defined. Not to mention that -include is a preprocessor option and shouldn't be in CXXFLAGS in the first place (Automake has CPPFLAGS, but qmake only has INCLUDEPATH and DEFINES). [ChangeLog][qmake] Added the ability to suppress the collection of the compiler predefined macros for moc's use. To disable the collection, use CONFIG += no_moc_predefs. Task-number: QTBUG-58857 Change-Id: I4139d5f93dcb4b429ae9fffd14a34d49825d9b85 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/moc.prf2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index cded960de1..0cdfa300f5 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -27,7 +27,7 @@ win32:count(MOC_INCLUDEPATH, 40, >) {
# QNX's compiler sets "gcc" config, but does not support the -dM option;
# UIKit builds are always multi-arch due to simulator_and_device (unless
# -sdk is used) so this feature cannot possibly work.
-if(gcc|intel_icl|msvc):!rim_qcc:!uikit {
+if(gcc|intel_icl|msvc):!rim_qcc:!uikit:!no_moc_predefs {
moc_predefs.name = "Generate moc_predefs.h"
moc_predefs.CONFIG = no_link
gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}