diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-07-07 11:18:41 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-07-22 10:21:36 +0000 |
commit | dd59118b87d779e5cbfcd0b4ee2a3d5332433da9 (patch) | |
tree | fadbe87c2bd334130f37ccd98b66480f6b0a173a /src/corelib/global | |
parent | b5153d5bfab63da811b7a4615238d9e50198b412 (diff) |
move c++11 test into qcompilerdetection.h and make it stricter
it positively makes no sense to have a configure test which will be
never reached due to the configure/qmake bootstrap failing with a
slew of totally unhelpful error messages.
pre-standardization partial c++11 implementations are now rejected,
except for VS2013, which is still sufficient despite not announcing full
compatibility.
Change-Id: I58af10e03960af06b80cedac105cf8433f7a1745
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index e152786d3f..285931e794 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -557,6 +557,12 @@ * Q_COMPILER_RESTRICTED_VLA variable-length arrays, prior to __cpp_runtime_arrays */ +#ifdef __cplusplus +# if __cplusplus < 201103L && !(defined(Q_CC_MSVC) && Q_CC_MSVC >= 1800) +# error Qt requires a C++11 compiler and yours does not seem to be that. +# endif +#endif + #ifdef Q_CC_INTEL # define Q_COMPILER_RESTRICTED_VLA # define Q_COMPILER_VARIADIC_MACROS // C++11 feature supported as an extension in other modes, too |