We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1e50d0 commit fbb31b5Copy full SHA for fbb31b5
test/gtest.mk
@@ -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
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