diff options
Diffstat (limited to 'mkspecs/features/default_post.prf')
-rw-r--r-- | mkspecs/features/default_post.prf | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 0e41b825ec..2be446e41e 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -64,11 +64,13 @@ debug { QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG + DEFINES += $$DEFINES_DEBUG } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE + DEFINES += $$DEFINES_RELEASE } stack_protector_strong { @@ -120,24 +122,24 @@ breakpad { } c++17: CONFIG += c++1z -c++latest: CONFIG *= c++2a c++1z c++14 c++11 +c++20: CONFIG += c++2a +c++latest: CONFIG *= c++2b 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:!c++2b { + # 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|c++2b { # 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 + c++2b: cxxstd = CXX2B + else:c++2a: cxxstd = CXX2A + 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 @@ -153,7 +155,8 @@ c++11|c++14|c++1z|c++2a { unset(cxxstd) } -c99|c11 { +c99|c11|c17|c18 { + c17|c18: cstd = C17 c11: cstd = C11 else: cstd = C99 @@ -166,7 +169,7 @@ c99|c11 { unset(cstd) } -utf8_source { +!no_utf8_source { QMAKE_CFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE } |