"googlemock/git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "bf0fe874a27bd6c9a4a35b98e662d2d02f8879a2"
Commit 2ddba266 authored by Tom Hughes's avatar Tom Hughes Committed by Copybara-Service
Browse files

Always specify definitions for internal macros

These macros should only be used within googletest, so changing them will not
affect external users.

This allows compiling with -Wundef (#3267).

PiperOrigin-RevId: 513946162
Change-Id: I2f2b7df9123adeba4147593b2b55fde349ccce4f
parent 0bdd4508
...@@ -214,6 +214,14 @@ ...@@ -214,6 +214,14 @@
// GTEST_INTERNAL_HAS_VARIANT - for enabling UniversalPrinter<std::variant> or // GTEST_INTERNAL_HAS_VARIANT - for enabling UniversalPrinter<std::variant> or
// UniversalPrinter<absl::variant> // UniversalPrinter<absl::variant>
// specializations. Always defined to 0 or 1. // specializations. Always defined to 0 or 1.
// GTEST_USE_OWN_FLAGFILE_FLAG_ - Always defined to 0 or 1.
// GTEST_HAS_CXXABI_H_ - Always defined to 0 or 1.
// GTEST_CAN_STREAM_RESULTS_ - Always defined to 0 or 1.
// GTEST_HAS_ALT_PATH_SEP_ - Always defined to 0 or 1.
// GTEST_WIDE_STRING_USES_UTF16_ - Always defined to 0 or 1.
// GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Always defined to 0 or 1.
// GTEST_HAS_DOWNCAST_ - Always defined to 0 or 1.
// GTEST_HAS_NOTIFICATION_- Always defined to 0 or 1.
// //
// Synchronization: // Synchronization:
// Mutex, MutexLock, ThreadLocal, GetThreadCount() // Mutex, MutexLock, ThreadLocal, GetThreadCount()
...@@ -305,6 +313,18 @@ ...@@ -305,6 +313,18 @@
#include "gtest/internal/custom/gtest-port.h" #include "gtest/internal/custom/gtest-port.h"
#include "gtest/internal/gtest-port-arch.h" #include "gtest/internal/gtest-port-arch.h"
#ifndef GTEST_HAS_DOWNCAST_
#define GTEST_HAS_DOWNCAST_ 0
#endif
#ifndef GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
#define GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ 0
#endif
#ifndef GTEST_HAS_NOTIFICATION_
#define GTEST_HAS_NOTIFICATION_ 0
#endif
#ifdef GTEST_HAS_ABSL #ifdef GTEST_HAS_ABSL
#include "absl/flags/declare.h" #include "absl/flags/declare.h"
#include "absl/flags/flag.h" #include "absl/flags/flag.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment