diff options
author | jgm <jgm@google.com> | 2012-12-03 18:52:06 +0000 |
---|---|---|
committer | jgm <jgm@google.com> | 2012-12-03 18:52:06 +0000 |
commit | 268ba618154d80648aca80a4e9298dab5cceed75 (patch) | |
tree | c348644bc815c01f8ac3be29b8a24572cc47b901 | |
parent | 87fdda2cf24d953f3cbec1e0c266b2db9928f406 (diff) | |
download | googletest-268ba618154d80648aca80a4e9298dab5cceed75.tar.gz googletest-268ba618154d80648aca80a4e9298dab5cceed75.tar.bz2 googletest-268ba618154d80648aca80a4e9298dab5cceed75.zip |
Unbreak building gtest with -std=c++11 on Mac OS X 10.6. Also, better support for death tests in iOS simulator.
-rw-r--r-- | include/gtest/internal/gtest-port.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index e92b7f1f..c79f12a2 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 <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) |