Make the C++11 atomic support the default, if available

Change-Id: Ib056b47dde3341ef9a52ffff13ef1647ccd607b1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
Thiago Macieira 2015-07-08 14:35:03 -07:00 committed by Simon Hausmann
parent c751cef8d6
commit 9d1fab424e
19 changed files with 25 additions and 25 deletions

View File

@ -39,11 +39,13 @@
#if defined(QT_BOOTSTRAPPED)
# include <QtCore/qatomic_bootstrap.h>
// The following two are used for testing only.
// Note that we don't check the compiler support -- you had better
// know what you're doing if you set them
#elif defined(QT_ATOMIC_FORCE_CXX11)
// If C++11 atomics are supported, use them!
#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) && !defined(QT_ATOMIC_FORCE_NO_CXX11)
# include <QtCore/qatomic_cxx11.h>
// The following is used for testing only.
// Note that we don't check the compiler support -- you had better
// know what you're doing if you set it
#elif defined(QT_ATOMIC_FORCE_GCC)
# include <QtCore/qatomic_gcc.h>
@ -66,8 +68,6 @@
# include <QtCore/qatomic_x86.h>
// Fallback compiler dependent implementation
#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR)
# include <QtCore/qatomic_cxx11.h>
#elif defined(Q_CC_GNU)
# include <QtCore/qatomic_gcc.h>

View File

@ -3,9 +3,9 @@ TYPE = $$basename(_PRO_FILE_PWD_)
dn = $$dirname(_PRO_FILE_PWD_)
FORCE = $$basename(dn)
equals(FORCE, cxx11) {
suffix = Cxx11_$$TYPE
DEFINES += QT_ATOMIC_FORCE_CXX11
equals(FORCE, no-cxx11) {
suffix = NoCxx11_$$TYPE
DEFINES += QT_ATOMIC_FORCE_NO_CXX11
} else: equals(FORCE, gcc) {
suffix = Gcc_$$TYPE
DEFINES += QT_ATOMIC_FORCE_GCC

View File

@ -19,22 +19,22 @@ SUBDIRS=\
contains(QT_CONFIG, c++11)|msvc: SUBDIRS +=\
cxx11/char \
cxx11/char16_t \
cxx11/char32_t \
cxx11/int \
cxx11/long \
cxx11/qlonglong \
cxx11/qptrdiff \
cxx11/quintptr \
cxx11/qulonglong \
cxx11/schar \
cxx11/short \
cxx11/uchar \
cxx11/uint \
cxx11/ulong \
cxx11/ushort \
cxx11/wchar_t \
no-cxx11/char \
no-cxx11/char16_t \
no-cxx11/char32_t \
no-cxx11/int \
no-cxx11/long \
no-cxx11/qlonglong \
no-cxx11/qptrdiff \
no-cxx11/quintptr \
no-cxx11/qulonglong \
no-cxx11/schar \
no-cxx11/short \
no-cxx11/uchar \
no-cxx11/uint \
no-cxx11/ulong \
no-cxx11/ushort \
no-cxx11/wchar_t \
# The GCC-style atomics only support 32-bit and pointer-sized but add