diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2014-07-13 20:15:00 (GMT) |
---|---|---|
committer | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2014-07-23 20:30:59 (GMT) |
commit | bc620055c82a8ccae49144ad99bf9226d659f852 (patch) | |
tree | 05b59d3e07262ae3e4438199215daaa1c2f4e410 /tools | |
parent | 5049696cafe6eb9b75966930e5058fd98fa8d18f (diff) | |
download | Qt-bc620055c82a8ccae49144ad99bf9226d659f852.zip Qt-bc620055c82a8ccae49144ad99bf9226d659f852.tar.gz Qt-bc620055c82a8ccae49144ad99bf9226d659f852.tar.bz2 |
Move the C++11 support macros to a central place.
The main objective of this commit is to make C++11 support work with
clang: so far, the Q_COMPILER_* definitions related to C++11 were
enabled based on __GNUC__ and __GNUC_MINOR__; while clang does define
those two, __GNUC_MINOR__ is hardcoded at "2" and thus none of the
macros end up being defined.
We now make qglobal.h more similar to how qtbase's qcompilerdetection.h
works by separating the detection of the C++11 features supported by a
compiler from the detection of the compilers themselves.
It is important to note the list of macros has not changed, the macros
have only been moved.
This commit either follows the spirit of or is a cherry-pick of the
following qtbase ones:
- 4131c323a36ee8680a3b4d66a2a03a00544751c2 (Update the C++11 support
macros)
- 8dd66f42e834320c4ba0a6f2e45855d591b3b6e7 (Avoid undefined macro
warning for __GXX_EXPERIMENTAL_CXX0X__)
- fe5d5fdaf1d9b7d108727d290e24a6b0f00139c6 (clang: Use __has_feature()
to detect C++11 features)
- 0ec953c93688ec0de74cda43b91f66f4cf879e5f (Remove extra Q_COMPILER_xxx
defines from the MSVC section)
- 163dcf2b71f34a12137f200e4af5640e42e5f5e2 (Fix build with older Clang
versions without __has_extension)
- 53262b9b5b9cb536916f6d6e086a944cb17bb8d8 (Only define the MSVC C++11
feature macros in C++)
Change-Id: I2ca35af1a23260a9373943f97a8a72db3fc670e4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions