Revert "Make internal googletest optional."
This reverts commit 60b131cc2f57ae1408498538d024f65dcfc2c35e.
Having internal googletest is not necessary, and therefore not wanted.
Change-Id: Ib6d215ed5c53c64e8477e4df6b8921513c270ab3
Reviewed-on: https://weave-review.googlesource.com/2480
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/tests.mk b/tests.mk
index 468e2ee..4e11f7e 100644
--- a/tests.mk
+++ b/tests.mk
@@ -2,13 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-USE_INTERNAL_GTEST ?= 1
-
-test_common_build_flags := -lcrypto -lexpat -lpthread -lrt -Lthird_party/lib
-ifneq (1, $(USE_INTERNAL_GTEST))
-test_common_build_flags += -lgtest -lgmock
-endif
-
###
# tests
@@ -22,11 +15,7 @@
weave_test_obj_files := $(WEAVE_TEST_SRC_FILES:%.cc=out/$(BUILD_MODE)/%.o)
-ifeq (1, $(USE_INTERNAL_GTEST))
-$(weave_test_obj_files) : third_party/include/gtest/gtest.h
-endif
-
-$(weave_test_obj_files) : out/$(BUILD_MODE)/%.o : %.cc
+$(weave_test_obj_files) : out/$(BUILD_MODE)/%.o : %.cc third_party/include/gtest/gtest.h
mkdir -p $(dir $@)
$(CXX) $(DEFS_$(BUILD_MODE)) $(INCLUDES) $(CFLAGS) $(CFLAGS_$(BUILD_MODE)) $(CFLAGS_CC) -c -o $@ $<
@@ -35,25 +24,19 @@
weave_unittest_obj_files := $(WEAVE_UNITTEST_SRC_FILES:%.cc=out/$(BUILD_MODE)/%.o)
-ifeq (1, $(USE_INTERNAL_GTEST))
-$(weave_unittest_obj_files) : third_party/include/gtest/gtest.h
-endif
-
-$(weave_unittest_obj_files) : out/$(BUILD_MODE)/%.o : %.cc
+$(weave_unittest_obj_files) : out/$(BUILD_MODE)/%.o : %.cc third_party/include/gtest/gtest.h
mkdir -p $(dir $@)
$(CXX) $(DEFS_TEST) $(INCLUDES) $(CFLAGS) $(CFLAGS_$(BUILD_MODE)) $(CFLAGS_CC) -c -o $@ $<
-ifeq (1, $(USE_INTERNAL_GTEST))
-out/$(BUILD_MODE)/libweave_testrunner : third_party/lib/gmock.a third_party/lib/gtest.a
-endif
-
out/$(BUILD_MODE)/libweave_testrunner : \
$(weave_unittest_obj_files) \
$(third_party_chromium_crypto_unittest_obj_files) \
$(third_party_chromium_base_unittest_obj_files) \
out/$(BUILD_MODE)/libweave_common.a \
- out/$(BUILD_MODE)/libweave-test.a
- $(CXX) -o $@ $^ $(CFLAGS) $(test_common_build_flags)
+ out/$(BUILD_MODE)/libweave-test.a \
+ third_party/lib/gmock.a \
+ third_party/lib/gtest.a
+ $(CXX) -o $@ $^ $(CFLAGS) -lcrypto -lexpat -lpthread -lrt -Lthird_party/lib
test : out/$(BUILD_MODE)/libweave_testrunner
$(TEST_ENV) $< $(TEST_FLAGS)
@@ -67,16 +50,14 @@
mkdir -p $(dir $@)
$(CXX) $(DEFS_TEST) $(INCLUDES) $(CFLAGS) $(CFLAGS_$(BUILD_MODE)) $(CFLAGS_CC) -c -o $@ $<
-ifeq (1, $(USE_INTERNAL_GTEST))
-out/$(BUILD_MODE)/libweave_exports_testrunner : third_party/lib/gmock.a third_party/lib/gtest.a
-endif
-
out/$(BUILD_MODE)/libweave_exports_testrunner : \
$(weave_exports_unittest_obj_files) \
out/$(BUILD_MODE)/libweave.so \
out/$(BUILD_MODE)/libweave-test.a \
- out/$(BUILD_MODE)/src/test/weave_testrunner.o
- $(CXX) -o $@ $^ $(CFLAGS) $(test_common_build_flags) -Wl,-rpath=out/$(BUILD_MODE)/
+ out/$(BUILD_MODE)/src/test/weave_testrunner.o \
+ third_party/lib/gmock.a \
+ third_party/lib/gtest.a
+ $(CXX) -o $@ $^ $(CFLAGS) -lcrypto -lexpat -lpthread -lrt -Lthird_party/lib -Wl,-rpath=out/$(BUILD_MODE)/
export-test : out/$(BUILD_MODE)/libweave_exports_testrunner
$(TEST_ENV) $< $(TEST_FLAGS)