endif()
add_library(gmock STATIC ${UNITTEST_TARGET_OPTIONS} ${GMOCK_SOURCES} ${GTEST_SOURCES})
-set_property(TARGET gmock APPEND PROPERTY COMPILE_DEFINITIONS "${GMOCK_COMPILE_DEFINITIONS}")
+set_property(TARGET gmock APPEND PROPERTY COMPILE_DEFINITIONS "${GMOCK_COMPILE_DEFINITIONS};GTEST_CAN_STREAM_RESULTS=0")
set(GMOCK_LIBRARIES gmock ${PTHREADS_LIBRARIES} PARENT_SCOPE)
set(GTEST_LIBRARIES ${GMOCK_LIBRARIES} PARENT_SCOPE)
we have added a define to only use this if GTEST_HAS_WCSCASECMP is set. Since
we never set this define, we fall back on the alternative internal implementation
which should be perfectly fine for now.
+
+gmock-1.7.0 also assumes that streaming results to a socket is
+something you can always do on Linux, but the implementation uses
+getaddrinfo(), about which the Cray linker warns because its use would
+require shared libraries at run time. Since Gromacs testing doesn't
+use this feature, we'd just want to turn it off, but there's no
+interface for that. So, GTEST_CAN_STREAM_RESULTS is added in
+gtest/include/gtest/internal/gtest-port.h to allow the default
+behaviour to be applied only if the user hasn't gotten involved.
\ No newline at end of file
// GTEST_CREATE_SHARED_LIBRARY
// - Define to 1 when compiling Google Test itself
// as a shared library.
+// GTEST_CAN_STREAM_RESULTS - Define to 1/0 to indicate that streaming
+// results to a socket is/isn't available
// This header defines the following utilities:
//
(GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
// Determines whether test results can be streamed to a socket.
-#if GTEST_OS_LINUX
-# define GTEST_CAN_STREAM_RESULTS_ 1
+#ifndef GTEST_CAN_STREAM_RESULTS
+# if GTEST_OS_LINUX
+# define GTEST_CAN_STREAM_RESULTS_ 1
+# endif
+#else
+# define GTEST_CAN_STREAM_RESULTS_ GTEST_CAN_STREAM_RESULTS
#endif
// Defines some utility macros.