Support GTest for FreeBSD platforms (9.x)

Patch by Viktor Kutuzov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201683 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexey Samsonov 2014-02-19 15:18:30 +00:00
parent f51321702b
commit 2228d01073
2 changed files with 8 additions and 2 deletions

View File

@ -16,6 +16,7 @@ $ rm -f src/gtest_main.cc
$ mv COPYING LICENSE.TXT
Modified as follows:
* Added support for FreeBSD.
* To GTestStreamToHelper in include/gtest/internal/gtest-internal.h,
added the ability to stream with raw_os_ostream.
* To refresh Haiku support in include/gtest/internal/gtest-port.h,

View File

@ -86,6 +86,7 @@
// the given platform; otherwise undefined):
// GTEST_OS_AIX - IBM AIX
// GTEST_OS_CYGWIN - Cygwin
// GTEST_OS_FREEBSD - FreeBSD
// GTEST_OS_HAIKU - Haiku
// GTEST_OS_HPUX - HP-UX
// GTEST_OS_LINUX - Linux
@ -228,6 +229,8 @@
# endif // _WIN32_WCE
#elif defined __APPLE__
# define GTEST_OS_MAC 1
#elif defined __FreeBSD__
# define GTEST_OS_FREEBSD 1
#elif defined __linux__
# define GTEST_OS_LINUX 1
# if defined(ANDROID) || defined(__ANDROID__)
@ -421,7 +424,8 @@
//
// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
// to your compiler flags.
# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX)
# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || \
GTEST_OS_HPUX || GTEST_OS_FREEBSD)
#endif // GTEST_HAS_PTHREAD
#if GTEST_HAS_PTHREAD
@ -545,7 +549,8 @@
// pops up a dialog window that cannot be suppressed programmatically.
#if (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX)
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || \
GTEST_OS_HPUX || GTEST_OS_FREEBSD)
# define GTEST_HAS_DEATH_TEST 1
# include <vector> // NOLINT
#endif