From 3464a05a94c4e638d91b2151d6aad70f78ea3087 Mon Sep 17 00:00:00 2001
From: Norwegian Rock Cat <qt-info@nokia.com>
Date: Mon, 8 Jun 2009 19:38:14 -0700
Subject: Add an error message for building architecture mismatch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Snow Leopard defaults to 64-bit if you don't specify an architecture,
whereas in the past it defaulted to 32-bit. This isn't a problem for Qt
per-se. It *is* a problem if you just build an application that uses Qt
but isn't using qmake stuff. To help in those situations, we should
error out to let the person know that they need to change their
configuration (in any case, the headers are going to complain and they
get a much more cryptic message).

Reviewed by: Morten Sørvig
---
 src/corelib/global/qglobal.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index f834bc7..b8a9024 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -279,6 +279,10 @@ namespace QT_NAMESPACE {}
 #  endif
 #endif
 
+#if defined(Q_OS_MAC64) && !defined(QT_MAC_USE_COCOA)
+#error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."
+#endif
+
 #if defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
 #  undef Q_OS_UNIX
 #elif !defined(Q_OS_UNIX)
-- 
cgit v0.12