diff --git a/configure b/configure index 5cd2787bda..34312cbcf8 100755 --- a/configure +++ b/configure @@ -831,14 +831,14 @@ fi echo "########################################################################" > "$mkfile" echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile" echo "########################################################################" >> "$mkfile" - EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS) \$(QMAKE_CXXFLAGS_CXX11) \$(QMAKE_CXXFLAGS_SPLIT_SECTIONS)" + EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS) \$(QMAKE_CXXFLAGS_CXX1Z) \$(QMAKE_CXXFLAGS_SPLIT_SECTIONS)" EXTRA_LFLAGS="\$(QMAKE_LFLAGS) \$(QMAKE_LFLAGS_GCSECTIONS)" [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM= setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM" setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM" setBootstrapVariable QMAKE_CXXFLAGS - setBootstrapVariable QMAKE_CXXFLAGS_CXX11 + setBootstrapVariable QMAKE_CXXFLAGS_CXX1Z setBootstrapVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS setBootstrapVariable QMAKE_LFLAGS setBootstrapVariable QMAKE_LFLAGS_GCSECTIONS diff --git a/mkspecs/common/icc-base-unix.conf b/mkspecs/common/icc-base-unix.conf index e0bb55577e..5fba8dbfbb 100644 --- a/mkspecs/common/icc-base-unix.conf +++ b/mkspecs/common/icc-base-unix.conf @@ -68,7 +68,7 @@ QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions QMAKE_CXXFLAGS_CXX11 = -std=c++11 QMAKE_CXXFLAGS_CXX14 = -std=c++1y -QMAKE_CXXFLAGS_CXX1Z = -std=c++1z +QMAKE_CXXFLAGS_CXX1Z = -std=c++17 QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11 QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf index d16b77acb8..6a1b076d7d 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -5,7 +5,7 @@ QMAKE_PLATFORM += macos osx macx QMAKE_MAC_SDK = macosx -QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13 +QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 QMAKE_APPLE_DEVICE_ARCHS = x86_64 # Should be 10.15, but as long as the CI builds with diff --git a/mkspecs/common/qcc-base-qnx.conf b/mkspecs/common/qcc-base-qnx.conf index 4725371c29..dce6d8ea2c 100644 --- a/mkspecs/common/qcc-base-qnx.conf +++ b/mkspecs/common/qcc-base-qnx.conf @@ -46,7 +46,7 @@ QMAKE_RPATHLINKDIR_POST += $${QNX_DIR}/$${QNX_CPUDIR}/lib $${QNX_DIR}/$${QNX_CPU QMAKE_CXXFLAGS_CXX11 = QMAKE_CXXFLAGS_CXX14 = -QMAKE_CXXFLAGS_CXX1Z = +QMAKE_CXXFLAGS_CXX1Z = -Wc,-std=gnu++1z QMAKE_CXXFLAGS_GNUCXX11 = -Wc,-std=gnu++11 QMAKE_CXXFLAGS_GNUCXX14 = -Wc,-std=gnu++1y 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 diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 6f27b735d4..20644595d2 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -28,7 +28,7 @@ CFLAGS_PCH = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch PCH_OBJECT = qmake_pch.obj CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \ - -W2 -nologo -O2 \ + -W2 -nologo -O2 -std:c++17 -Zc:__cplusplus \ $(CFLAGS_EXTRA) \ -I$(QMKSRC) -I$(QMKSRC)\library -I$(QMKSRC)\generators -I$(QMKSRC)\generators\unix -I$(QMKSRC)\generators\win32 -I$(QMKSRC)\generators\mac \ -I$(SOURCE_PATH)/src/3rdparty/tinycbor/src \