Unbreak building gtest with -std=c++11 on Mac OS X 10.6. Also, better support for death tests in iOS simulator.

This commit is contained in:
jgm 2012-12-03 18:52:06 +00:00
parent 87fdda2cf2
commit 268ba61815

View File

@ -93,6 +93,7 @@
// GTEST_OS_LINUX_ANDROID - Google Android
// GTEST_OS_MAC - Mac OS X
// GTEST_OS_IOS - iOS
// GTEST_OS_IOS_SIMULATOR - iOS simulator
// GTEST_OS_NACL - Google Native Client (NaCl)
// GTEST_OS_OPENBSD - OpenBSD
// GTEST_OS_QNX - QNX
@ -240,7 +241,7 @@
# if TARGET_OS_IPHONE
# define GTEST_OS_IOS 1
# if TARGET_IPHONE_SIMULATOR
# define GEST_OS_IOS_SIMULATOR 1
# define GTEST_OS_IOS_SIMULATOR 1
# endif
# endif
#elif defined __linux__
@ -517,10 +518,10 @@
# define GTEST_ENV_HAS_TR1_TUPLE_ 1
# endif
// C++11 specifies that <tuple> provides std::tuple. Users can't use
// gtest in C++11 mode until their standard library is at least that
// compliant.
# if GTEST_LANG_CXX11
// C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used
// in C++11 mode and libstdc++ isn't very old (binaries targeting OS X 10.6
// can build with clang but need to use gcc4.2's libstdc++).
# if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325)
# define GTEST_ENV_HAS_STD_TUPLE_ 1
# endif
@ -638,7 +639,7 @@ using ::std::tuple_size;
// abort() in a VC 7.1 application compiled as GUI in debug config
// pops up a dialog window that cannot be suppressed programmatically.
#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
(GTEST_OS_MAC && (!GTEST_OS_IOS || GEST_OS_IOS_SIMULATOR)) || \
(GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
GTEST_OS_OPENBSD || GTEST_OS_QNX)