Add missing test/gtest.mk script.

This commit is contained in:
David Baird
2014-12-07 01:18:06 -05:00
parent e1e50d092d
commit fbb31b5148
+21
View File
@@ -0,0 +1,21 @@
# gtest.mk
# Uses the source code version of GoogleTest, assumed to be installed at /usr/src/gtest.
GTEST_PATH ?= /usr/src/gtest
GTEST_OBJS = gtest-all.o
LDLIBS += -lpthread
LDLIBS += -lstdc++
vpath %.cc $(GTEST_PATH)/src
GTEST_FOUND = $(ls -d $(GTEST_PATH)/src/main.cc)
ifeq (,$(GTEST_FOUND))
$(info )
$(info Error:)
$(info GoogleTest sources were not found at the path:)
$(info GTEST_PATH=$(GTEST_PATH))
$(info Suggested corrective action: sudo apt-get install libgtest-dev)
$(info )
$(error Please setup GTEST_PATH so that gtest-all.cc can be found.)
endif
all:
gtest-all.o: CXXFLAGS += -I$(GTEST_PATH)