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>
This commit is contained in:
Tor Arne Vestbø 2014-01-27 17:17:04 +01:00 committed by The Qt Project
parent 9063edef79
commit a4e0f4f80a

View File

@ -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)