diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2019-12-03 11:53:32 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-02-08 09:49:07 +0100 |
commit | 4933a5f89231afd64b1604d47220e1ff34d2c448 (patch) | |
tree | 8e62e43d5bec1bc749635d0a28899257a82d5976 /mkspecs/features/default_post.prf | |
parent | 3568ad58f5e273d60f089a1b2d8c91c9535c8cad (diff) |
Use C++17 for qmake and force the build of everything with C++17
We will want to use C++17 code in our headers soon.
(including the one in the bootstrap libraries)
This patch is quick and dirty, I guess it will be cleaner once we move to cmake
Updated QMAKE_MACOSX_DEPLOYMENT_TARGET because 10.13 runtime does
not support C++17 stdlib features
Change-Id: I75ac171436945dddd1bb953a9c8d323ac20da7ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs/features/default_post.prf')
-rw-r--r-- | mkspecs/features/default_post.prf | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 1d79f5c958..9c73eeef69 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -124,22 +124,20 @@ breakpad { c++17: CONFIG += c++1z c++latest: CONFIG *= c++2a c++1z c++14 c++11 -!c++11:!c++14:!c++1z:!c++2a { - # Qt requires C++11 since 5.7, check if we need to force a compiler option +!c++1z:!c++2a { + # Qt requires C++17 QT_COMPILER_STDCXX_no_L = $$replace(QT_COMPILER_STDCXX, "L$", "") - !greaterThan(QT_COMPILER_STDCXX_no_L, 199711): CONFIG += c++11 + !greaterThan(QT_COMPILER_STDCXX_no_L, 201402): CONFIG += c++1z } -c++11|c++14|c++1z|c++2a { +c++1z|c++2a { # Disable special compiler flags for host builds !host_build|!cross_compile { c++2a: cxxstd = CXX2A - else: c++1z: cxxstd = CXX1Z - else: c++14: cxxstd = CXX14 - else: cxxstd = CXX11 + else: cxxstd = CXX1Z } else { - # Fall back to c++11, because since 5.7 c++11 is required everywhere, + # Fall back to c++17, because C++17 is required everywhere, # including host builds - cxxstd = CXX11 + cxxstd = CXX1Z } # Check if we should disable compiler extensions or not |