qt5base-lts/qmake
Thiago Macieira 36d524e6a3 moc: get the system #defines from the compiler itself
In order for moc to properly parse #ifdefs and family, we've had
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
compiler. That list is woefully incomplete.

Instead, let's simply ask the compiler for the list. With GCC and
family, we use the -dM flag while preprocessing. With ICC on Windows,
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
requires using some undocumented switches and parsing environment
variables (I've tested MSVC 2012, 2013 and 2015).

The new moc option is called --include to be similar to GCC's -include
option. It does more than just parse a list of pre-defined macros and
can be used to insert any sort of code that moc needs to parse prior to
the main file.

Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-20 02:54:03 +00:00
..
doc Merge remote-tracking branch 'origin/5.7' into dev 2016-06-21 08:39:41 +02:00
generators Remove the -target command line option 2016-07-05 15:49:03 +00:00
library Merge remote-tracking branch 'origin/5.7' into dev 2016-06-21 08:39:41 +02:00
cachekeys.h Updated license headers 2016-01-21 18:55:18 +00:00
main.cpp moc: get the system #defines from the compiler itself 2016-07-20 02:54:03 +00:00
Makefile.unix Merge remote-tracking branch 'origin/5.7' into dev 2016-05-23 21:09:46 +02:00
Makefile.win32 configure.exe: Remove old code that supported MSVC < 2013 2016-06-20 16:13:06 +00:00
meta.cpp qmake: eradicate Q_FOREACH loops [needing qAsConst()] 2016-01-28 20:25:18 +00:00
meta.h Updated license headers 2016-01-21 18:55:18 +00:00
option.cpp qmake: use reserve to optimize memory allocation. 2016-02-01 20:57:59 +00:00
option.h qmake: eradicate Q_FOREACH loops [already const] 2016-01-28 20:25:21 +00:00
project.cpp make QMakeParser take a QStringRef as input 2016-05-24 12:38:59 +00:00
project.h make QMakeParser take a QStringRef as input 2016-05-24 12:38:59 +00:00
property.cpp qmake: eradicate Q_FOREACH loops [needing qAsConst()] 2016-01-28 20:25:18 +00:00
property.h Updated license headers 2016-01-21 18:55:18 +00:00
qmake_pch.h Updated license headers 2016-01-21 18:55:18 +00:00
qmake-aux.pro configure: Separate host and build platform. 2015-10-30 13:14:51 +00:00
qmake.pri qmake: Remove Windows CE support. 2016-03-10 13:33:44 +00:00
qmake.pro qmake/tools: port the last remaining Q_FOREACH loops and add QT_NO_FOREACH 2016-05-11 16:55:32 +00:00