[llvm] r201683 - Support GTest for FreeBSD platforms (9.x)
Alexey Samsonov
samsonov at google.com
Wed Feb 19 07:18:30 PST 2014
Author: samsonov
Date: Wed Feb 19 09:18:30 2014
New Revision: 201683
URL: http://llvm.org/viewvc/llvm-project?rev=201683&view=rev
Log:
Support GTest for FreeBSD platforms (9.x)
Patch by Viktor Kutuzov!
Modified:
llvm/trunk/utils/unittest/googletest/README.LLVM
llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
Modified: llvm/trunk/utils/unittest/googletest/README.LLVM
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/README.LLVM?rev=201683&r1=201682&r2=201683&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/README.LLVM (original)
+++ llvm/trunk/utils/unittest/googletest/README.LLVM Wed Feb 19 09:18:30 2014
@@ -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,
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h?rev=201683&r1=201682&r2=201683&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h (original)
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h Wed Feb 19 09:18:30 2014
@@ -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
More information about the llvm-commits
mailing list