--- modules/ts/include/opencv2/ts/ts_gtest.h.orig 2013-09-03 16:29:50.000000000 +0200 +++ modules/ts/include/opencv2/ts/ts_gtest.h 2013-09-03 16:29:54.000000000 +0200 @@ -314,9 +314,11 @@ #define GTEST_OS_SOLARIS 1 #elif defined(_AIX) #define GTEST_OS_AIX 1 +#elif defined(__FreeBSD__) +#define GTEST_OS_FREEBSD 1 #endif // __CYGWIN__ -#if (GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || \ +#if (GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || GTEST_OS_FREEBSD || \ GTEST_OS_SOLARIS || GTEST_OS_AIX) && !defined(ANDROID) // On some platforms, needs someone to define size_t, and @@ -471,7 +473,7 @@ // // 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) +#define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_FREEBSD) #endif // GTEST_HAS_PTHREAD // Determines whether Google Test can use tr1/tuple. You can define @@ -1548,7 +1550,7 @@ // Google Test does not support death tests for VC 7.1 and earlier as // 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_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ +#if (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || GTEST_OS_FREEBSD || \ (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX) #define GTEST_HAS_DEATH_TEST 1 @@ -1558,7 +1560,9 @@ // We don't support MSVC 7.1 with exceptions disabled now. Therefore // all the compilers we care about are adequate for supporting // value-parameterized tests. +#if !GTEST_OS_FREEBSD #define GTEST_HAS_PARAM_TEST 1 +#endif // Determines whether to support type-driven tests. @@ -2565,7 +2569,7 @@ #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ -#if GTEST_OS_LINUX +#if GTEST_OS_LINUX || GTEST_OS_FREEBSD #include #include #include