Resolve -Wundef triggering on GTEST_CREATE_SHARED_LIBRARY and GTEST_LINKED_AS_SHARED_LIBRARY with shared libraries in GoogleTest

Fixes: #4372
PiperOrigin-RevId: 568327612
Change-Id: Ifc47f1a2a2648c29858a22966331557cc928cc47
This commit is contained in:
Abseil Team 2023-09-25 14:37:34 -07:00 committed by Copybara-Service
parent 5bd0f08e0d
commit e47544ad31

View File

@ -845,9 +845,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#ifndef GTEST_API_
#ifdef _MSC_VER
#if GTEST_LINKED_AS_SHARED_LIBRARY
#if defined(GTEST_LINKED_AS_SHARED_LIBRARY) && GTEST_LINKED_AS_SHARED_LIBRARY
#define GTEST_API_ __declspec(dllimport)
#elif GTEST_CREATE_SHARED_LIBRARY
#elif defined(GTEST_CREATE_SHARED_LIBRARY) && GTEST_CREATE_SHARED_LIBRARY
#define GTEST_API_ __declspec(dllexport)
#endif
#elif GTEST_HAVE_ATTRIBUTE_(visibility)