diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-11-04 11:40:19 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-14 23:42:17 +0100 |
commit | 42ebe717753ff8ffa11bc823adddeb998523020d (patch) | |
tree | 000953e200bc905c44c4b00dbae444ad61d2d0c2 | |
parent | 5f17c41a25cb3a9e8a18840c3fd9042d0f18d5b3 (diff) |
Define __GNUC__ to be 4 on Mac OS X
The QMAKE_COMPILER_DEFINES are used when running moc. In some cases, Qt
checks the __GNUC__ value to determine which version of GCC is being
used. In particular, the qtconcurrentfilter and qtconcurrentmap tests
fail to compile because moc ends up defining QT_NO_CONCURRENT_FILTER and
QT_NO_CONCURRENT_MAP since the condition __GNUC__ < 4 evaluates to true.
The Mac OS X development tools have not used gcc 3.x is a very long
time. The current version ships with llvm-gcc-4.2.1 and clang (which
also masquerades as gcc 4.2.1). Defining __GNUC__=4 makes sure that moc
preprocesses headers in the same way the compiler does.
Change-Id: Ie491d3f5b074fd1a509ffe6755f3308836817b6c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
-rw-r--r-- | mkspecs/common/gcc-base-macx.conf | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mkspecs/common/gcc-base-macx.conf b/mkspecs/common/gcc-base-macx.conf index 2894f86fdd..79f6c11843 100644 --- a/mkspecs/common/gcc-base-macx.conf +++ b/mkspecs/common/gcc-base-macx.conf @@ -10,7 +10,7 @@ include(gcc-base.conf) -QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ +QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4 QMAKE_CFLAGS_X86 += -arch i386 QMAKE_CFLAGS_X86_64 += -arch x86_64 |