summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-07-08 13:51:59 -0700
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-10-16 07:25:21 +0000
commit4f829afc610272bd3396c222df1034990566d149 (patch)
tree56a7620e81f565ded6d02d59f7d8b4d2ef7933a5
parentffa7b050a19ef0169566dd7faf4625c9c6c0763d (diff)
Turn C++11 on by default if the compiler supports C++11
[ChangeLog][Important Behavior Changes] qmake now enables C++11 support by default if the compiler is known to support it (unless the compiler defaults to C++14 or a later edition). To disable this, add to your .pro file: CONFIG -= c++11. Note that Qt 5.7 will require C++11 support, so it is a good idea to ensure your code works with that compiler setting. (Note: it is not possible to disable C++11 support with Microsoft Visual Studio) Change-Id: Ib056b47dde3341ef9a52ffff13ef13ee2cf888eb Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
-rw-r--r--mkspecs/features/default_pre.prf2
1 files changed, 2 insertions, 0 deletions
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index eb3281ea1d..a247b46a72 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -8,6 +8,8 @@ CONFIG = \
testcase_targets import_plugins import_qpa_plugin \
$$CONFIG
+contains(QT_CONFIG, c++11):lessThan(QT_COMPILER_STDCXX, 201103): CONFIG += c++11
+
!build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") {
#
# call license checker (but cache result for one day)