summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-02-22 09:34:48 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-24 18:36:39 +0000
commit741b367d6ba92ddbd10d9f2ebc4eb6eb120caf00 (patch)
treec27e5f08d386902e150ee4ee6cede40fb428e8cf /src
parent5a8892f1e3c02d16dfe0bdcc9ce6f0ad9ac77697 (diff)
MSVC: Raise minimum version of Visual Studio 2019 to 16.7
The compile-time check for /permissive- only works from Visual Studio 16.7 onwards. Older compiler versions will fail the check, even if /permissive- is passed. Let's rather bail out with a more explicit error in this case. [ChangeLog][Windows] The minimum MSVC version was raised to Visual Studio 2019 version 16.7 (VC++ version 14.27). Trying to use an older version will now result in a compile time error. Task-number: QTBUG-101049 Change-Id: Ibfa2930e1186eb63d8fed69efe161a9d79ccb1be Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 1058f053e565dd8182ea0ad0038e7591454e0960) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index abae7490ce..6f5a4de092 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -98,6 +98,11 @@
#endif // __cplusplus
#if defined(__cplusplus) && defined(Q_CC_MSVC) && !defined(Q_CC_CLANG)
+# if Q_CC_MSVC < 1927
+ // Check below only works with 16.7 or newer
+# error "Qt requires at least Visual Studio 2019 version 16.7 (VC++ version 14.27). Please upgrade."
+# endif
+
// On MSVC we require /permissive- set by user code. Check that we are
// under its rules -- for instance, check that std::nullptr_t->bool is
// not an implicit conversion, as per