Skip to content

Commit

Permalink
Make googletest a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Aug 25, 2015
1 parent fede51f commit 16f6dac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
[submodule "third_party/gflags"]
path = third_party/gflags
url = https://github.com/gflags/gflags.git
[submodule "third_party/googletest"]
path = third_party/googletest
url = git://github.com/google/googletest
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,7 @@ LIBS = m z pthread
LDFLAGS += -pthread
endif

ifneq ($(wildcard /usr/src/gtest/src/gtest-all.cc),)
GTEST_LIB = /usr/src/gtest/src/gtest-all.cc -I/usr/src/gtest
else
GTEST_LIB = -lgtest
endif
GTEST_LIB = -Ithird_party/googletest/include -Ithird_party/googletest third_party/googletest/src/gtest-all.cc
GTEST_LIB += -lgflags
ifeq ($(V),1)
E = @:
Expand Down Expand Up @@ -612,6 +608,8 @@ PROTOBUF_PKG_CONFIG = false
PC_REQUIRES_GRPCXX =
PC_LIBS_GRPCXX =

CPPFLAGS := -Ithird_party/googletest/include $(CPPFLAGS)

ifeq ($(HAS_SYSTEM_PROTOBUF),true)
ifeq ($(HAS_PKG_CONFIG),true)
PROTOBUF_PKG_CONFIG = true
Expand Down
8 changes: 3 additions & 5 deletions templates/Makefile.template
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ LIBS = m z pthread
LDFLAGS += -pthread
endif

ifneq ($(wildcard /usr/src/gtest/src/gtest-all.cc),)
GTEST_LIB = /usr/src/gtest/src/gtest-all.cc -I/usr/src/gtest
else
GTEST_LIB = -lgtest
endif
GTEST_LIB = -Ithird_party/googletest/include -Ithird_party/googletest third_party/googletest/src/gtest-all.cc
GTEST_LIB += -lgflags
ifeq ($(V),1)
E = @:
Expand Down Expand Up @@ -637,6 +633,8 @@ PROTOBUF_PKG_CONFIG = false
PC_REQUIRES_GRPCXX =
PC_LIBS_GRPCXX =

CPPFLAGS := -Ithird_party/googletest/include $(CPPFLAGS)

ifeq ($(HAS_SYSTEM_PROTOBUF),true)
ifeq ($(HAS_PKG_CONFIG),true)
PROTOBUF_PKG_CONFIG = true
Expand Down
1 change: 1 addition & 0 deletions third_party/googletest
Submodule googletest added at c80449

0 comments on commit 16f6dac

Please sign in to comment.