Clean up gtest_prod mess.
Change-Id: I7b9b800c65cfc918770cd54b77993d2f0f2c0df6
diff --git a/aos/common/BUILD b/aos/common/BUILD
index 55f1a03..919c2a0 100644
--- a/aos/common/BUILD
+++ b/aos/common/BUILD
@@ -117,15 +117,12 @@
cc_library(
name = 'gtest_prod',
- deps = [
- '//third_party/gtest_prod',
- ],
)
cc_library(
name = 'once',
deps = [
- '//third_party/gtest_prod',
+ ':gtest_prod',
],
)
diff --git a/aos/common/common.gyp b/aos/common/common.gyp
index 17df955..54617db 100644
--- a/aos/common/common.gyp
+++ b/aos/common/common.gyp
@@ -167,21 +167,15 @@
{
'target_name': 'gtest_prod',
'type': 'static_library',
- 'dependencies': [
- '<(EXTERNALS):gtest_prod',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):gtest_prod',
- ],
},
{
'target_name': 'once',
'type': 'static_library',
'dependencies': [
- '<(EXTERNALS):gtest_prod',
+ ':gtest_prod',
],
'export_dependent_settings': [
- '<(EXTERNALS):gtest_prod',
+ ':gtest_prod',
],
},
{
diff --git a/aos/common/gtest_prod.h b/aos/common/gtest_prod.h
index fe0b056..6c7d96e 100644
--- a/aos/common/gtest_prod.h
+++ b/aos/common/gtest_prod.h
@@ -1,8 +1,6 @@
#ifndef AOS_COMMON_GTEST_PROD_H_
#define AOS_COMMON_GTEST_PROD_H_
-#include "gtest/gtest_prod.h"
-
// These macros replace gtest's FRIEND_TEST if the test is in a different
// namespace than the code that needs to make it a friend.
// Example:
@@ -34,4 +32,8 @@
#define FRIEND_TEST_NAMESPACE(test_case_name, test_name, namespace_name) \
friend class namespace_name::test_case_name##_##test_name##_Test
+// Copied from googletest's gtest_prod.h. See that file for documentation.
+#define FRIEND_TEST(test_case_name, test_name) \
+ friend class test_case_name##_##test_name##_Test
+
#endif // AOS_COMMON_GTEST_PROD_H_