diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-02-27 19:00:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 19:00:29 (GMT) |
commit | ce61dc54a20f00c474724d2af8bac5a2f3ebb206 (patch) | |
tree | 9554df496e75de546af395dc8f751a1e778a1f12 /googletest/include | |
parent | 7d15497f7538fb531d0f025929d080743af421ee (diff) | |
parent | d4f77c1e3a340b37f5bed5e1e4de7d741f1d1199 (diff) | |
download | googletest-ce61dc54a20f00c474724d2af8bac5a2f3ebb206.zip googletest-ce61dc54a20f00c474724d2af8bac5a2f3ebb206.tar.gz googletest-ce61dc54a20f00c474724d2af8bac5a2f3ebb206.tar.bz2 |
Merge pull request #1423 from pcc/win-libcxx2
Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.
Diffstat (limited to 'googletest/include')
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 2c819c9..4d5aa04 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -471,8 +471,11 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; #ifndef GTEST_HAS_EXCEPTIONS // The user didn't tell us whether exceptions are enabled, so we need // to figure it out. -# if defined(_MSC_VER) || defined(__BORLANDC__) -// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS +# if defined(_MSC_VER) && defined(_CPPUNWIND) +// MSVC defines _CPPUNWIND to 1 iff exceptions are enabled. +# define GTEST_HAS_EXCEPTIONS 1 +# elif defined(__BORLANDC__) +// C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS // macro to enable exceptions, so we'll do the same. // Assumes that exceptions are enabled by default. # ifndef _HAS_EXCEPTIONS |