Skip to content

Commit fbb31b5

Browse files
committed
Add missing test/gtest.mk script.
1 parent e1e50d0 commit fbb31b5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/gtest.mk

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# gtest.mk
2+
# Uses the source code version of GoogleTest, assumed to be installed at /usr/src/gtest.
3+
GTEST_PATH ?= /usr/src/gtest
4+
GTEST_OBJS = gtest-all.o
5+
LDLIBS += -lpthread
6+
LDLIBS += -lstdc++
7+
vpath %.cc $(GTEST_PATH)/src
8+
9+
GTEST_FOUND = $(ls -d $(GTEST_PATH)/src/main.cc)
10+
ifeq (,$(GTEST_FOUND))
11+
$(info )
12+
$(info Error:)
13+
$(info GoogleTest sources were not found at the path:)
14+
$(info GTEST_PATH=$(GTEST_PATH))
15+
$(info Suggested corrective action: sudo apt-get install libgtest-dev)
16+
$(info )
17+
$(error Please setup GTEST_PATH so that gtest-all.cc can be found.)
18+
endif
19+
20+
all:
21+
gtest-all.o: CXXFLAGS += -I$(GTEST_PATH)

0 commit comments

Comments
 (0)