From a6772271f71672e889776bfe49ec4efd9da036df Mon Sep 17 00:00:00 2001 From: "jgm@google.com" Date: Mon, 3 Dec 2012 18:52:06 +0000 Subject: Unbreak building gtest with -std=c++11 on Mac OS X 10.6. Also, better support for death tests in iOS simulator. git-svn-id: http://googletest.googlecode.com/svn/trunk@629 861a406c-534a-0410-8894-cb66d6ee9925 --- include/gtest/internal/gtest-port.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index e92b7f1..c79f12a 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -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 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 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) -- cgit v1.2.3