Fix definition of GTEST_API_ macro for gcc and clang [#451].

This is to enable using gtest with -fvisibility=hidden.
This commit is contained in:
Dominic Meiser 2015-10-05 17:27:17 -04:00
parent 43359642a1
commit bb5c92f9d1

View File

@ -920,14 +920,14 @@ using ::std::tuple_size;
#endif // GTEST_HAS_SEH
#ifdef _MSC_VER
# if GTEST_LINKED_AS_SHARED_LIBRARY
# define GTEST_API_ __declspec(dllimport)
# elif GTEST_CREATE_SHARED_LIBRARY
# define GTEST_API_ __declspec(dllexport)
# endif
#endif // _MSC_VER
#elif __GNUC__ >= 4 || defined(__clang__)
# define GTEST_API_ __attribute__((visibility ("default")))
#endif // _MSC_VER
#ifndef GTEST_API_
# define GTEST_API_