diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-08-24 17:00:04 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-08-24 17:00:04 -0700 |
commit | 16f6dac8e81a818f399b180c673d966cd40603c1 (patch) | |
tree | 9efeb77490c950ecf3e017705378916d1084ae55 | |
parent | fede51f7b7efe27afa73e094ab71aa6fa8b93712 (diff) |
Make googletest a submodule
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | templates/Makefile.template | 8 | ||||
m--------- | third_party/googletest | 0 |
4 files changed, 9 insertions, 10 deletions
diff --git a/.gitmodules b/.gitmodules index a5cf3aaaee..434d01b3d5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 @@ -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 = @: @@ -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 diff --git a/templates/Makefile.template b/templates/Makefile.template index 1b898efbdd..00582a22f8 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -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 = @: @@ -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 diff --git a/third_party/googletest b/third_party/googletest new file mode 160000 +Subproject c80449247c0e3032401297edf19a1be8078900c |