rocksdb: Add gtest

Summary:
Adds gtest fused source code into `third-party` directory. No manual changes.

gtest latest released 1.7 has clang dev compilation errors. Trunk version requires only one disabled warning (-Wno-missing-field-initializers)

Fused code is made as described here https://fburl.com/90806322
Details about why we need gtest source code instead of precompiled library https://fburl.com/90805763
Source used from http://googletest.googlecode.com/svn/trunk

Test Plan:
Build and notice no errors. Also check in logs that gtest-all.o being compiled gtest-all.o.
```lang=bash
% USE_CLANG=1 make all
```

Reviewers: lgalanis, yufei.zhu, rven, sdong, igor, meyering

Reviewed By: meyering

Subscribers: meyering, yhchiang, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D33345
main
Igor Sugak 10 years ago
parent 95344346af
commit a7aba2ef6b
  1. 10
      Makefile
  2. 1
      src.mk
  3. 10257
      third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc
  4. 20725
      third-party/gtest-1.7.0/fused-src/gtest/gtest.h

@ -101,6 +101,11 @@ ifndef DISABLE_JEMALLOC
PLATFORM_CCFLAGS += $(JEMALLOC_INCLUDE) -DHAVE_JEMALLOC PLATFORM_CCFLAGS += $(JEMALLOC_INCLUDE) -DHAVE_JEMALLOC
endif endif
export GTEST_THROW_ON_FAILURE=1 GTEST_HAS_EXCEPTIONS=1
GTEST_DIR = ./third-party/gtest-1.7.0/fused-src
PLATFORM_CCFLAGS += -isystem $(GTEST_DIR)
PLATFORM_CXXFLAGS += -isystem $(GTEST_DIR)
# This (the first rule) must depend on "all". # This (the first rule) must depend on "all".
default: all default: all
@ -133,7 +138,7 @@ ifndef DISABLE_WARNING_AS_ERROR
endif endif
CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT) CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual -Wnon-virtual-dtor CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers
LDFLAGS += $(PLATFORM_LDFLAGS) LDFLAGS += $(PLATFORM_LDFLAGS)
@ -161,8 +166,9 @@ util/build_version.cc:
LIBOBJECTS = $(LIB_SOURCES:.cc=.o) LIBOBJECTS = $(LIB_SOURCES:.cc=.o)
MOCKOBJECTS = $(MOCK_SOURCES:.cc=.o) MOCKOBJECTS = $(MOCK_SOURCES:.cc=.o)
GTEST = $(GTEST_DIR)/gtest/gtest-all.o
TESTUTIL = ./util/testutil.o TESTUTIL = ./util/testutil.o
TESTHARNESS = ./util/testharness.o $(TESTUTIL) $(MOCKOBJECTS) TESTHARNESS = ./util/testharness.o $(TESTUTIL) $(MOCKOBJECTS) $(GTEST)
BENCHHARNESS = ./util/benchharness.o BENCHHARNESS = ./util/benchharness.o
VALGRIND_ERROR = 2 VALGRIND_ERROR = 2
VALGRIND_DIR = build_tools/VALGRIND_LOGS VALGRIND_DIR = build_tools/VALGRIND_LOGS

@ -140,6 +140,7 @@ MOCK_SOURCES = \
util/mock_env.cc util/mock_env.cc
TEST_BENCH_SOURCES = \ TEST_BENCH_SOURCES = \
third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc \
db/column_family_test.cc \ db/column_family_test.cc \
db/compaction_job_test.cc \ db/compaction_job_test.cc \
db/compaction_picker_test.cc \ db/compaction_picker_test.cc \

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save