From a4e0f4f80a4cb6b76fe5610791fe64ffcc35fd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 27 Jan 2014 17:17:04 +0100 Subject: Ensure C++11 support matches between Qt and user projects for static builds Change-Id: Id529fb7fc52d2da312bcf17612e47c74939a617f Reviewed-by: Oswald Buddenhagen Reviewed-by: Simon Hausmann --- mkspecs/features/mac/default_post.prf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index c3addf9319..614b336f27 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -15,8 +15,17 @@ qt:!isEmpty(QT_CONFIG) { contains(QT_CONFIG, x86_64):!contains(QT_CONFIG, x86):CONFIG += x86_64 } - # Ensure that C++11 is always used when linking against a static Qt build - contains(QT_CONFIG, static):contains(QT_CONFIG, c++11): CONFIG += c++11 + contains(QT_CONFIG, static) { + # C++11 support means using libc++ instead of libstd++. As the + # two libraries are incompatible we need to ensure the end user + # project is built using the same C++11 support/no support as Qt. + contains(QT_CONFIG, c++11) { + CONFIG += c++11 + } else: c++11 { + warning("Qt was not built with C++11 enabled, disabling feature") + CONFIG -= c++11 + } + } } cache(QMAKE_XCODE_DEVELOPER_PATH, stash) -- cgit v1.2.3