diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-01-27 17:17:04 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-28 02:33:32 +0100 |
commit | a4e0f4f80a4cb6b76fe5610791fe64ffcc35fd66 (patch) | |
tree | 3e9f17bbb060b6e16aba8267a6ceb2de34ccd4de | |
parent | 9063edef796ad10eb9ac2229627f36d60168f0e2 (diff) |
Ensure C++11 support matches between Qt and user projects for static builds
Change-Id: Id529fb7fc52d2da312bcf17612e47c74939a617f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r-- | mkspecs/features/mac/default_post.prf | 13 |
1 files changed, 11 insertions, 2 deletions
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) |