aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorgennadiycivil <misterg@google.com>2019-01-07 12:09:33 -0500
committergennadiycivil <misterg@google.com>2019-01-07 12:09:34 -0500
commit644319b9f06f6ca9bf69fe791be399061044bc3d (patch)
tree5373cce7df929d0052cdbb2b1ef4614a1732b354 /googlemock
parentb6cd405286ed8635ece71c72f118e659f4ade3fb (diff)
parentade8baa7d2136554fac8e479614d710af03ab521 (diff)
downloadgoogletest-644319b9f06f6ca9bf69fe791be399061044bc3d.tar.gz
googletest-644319b9f06f6ca9bf69fe791be399061044bc3d.tar.bz2
googletest-644319b9f06f6ca9bf69fe791be399061044bc3d.zip
Merge pull request #2048 from ciband:chore/clang_tidy
PiperOrigin-RevId: 228173023
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/make/Makefile30
1 files changed, 7 insertions, 23 deletions
diff --git a/googlemock/make/Makefile b/googlemock/make/Makefile
index 386293a0..7c13e05f 100644
--- a/googlemock/make/Makefile
+++ b/googlemock/make/Makefile
@@ -19,9 +19,6 @@
# a copy of Google Test at a different location.
GTEST_DIR = ../../googletest
-# Points to the location of the Google Test libraries
-GTEST_LIB_DIR = .
-
# Points to the root of Google Mock, relative to where this file is.
# Remember to tweak this if you move this file.
GMOCK_DIR = ..
@@ -36,10 +33,7 @@ USER_DIR = ../test
CPPFLAGS += -isystem $(GTEST_DIR)/include -isystem $(GMOCK_DIR)/include
# Flags passed to the C++ compiler.
-CXXFLAGS += -g -Wall -Wextra -pthread -std=c++11
-
-# Google Test libraries
-GTEST_LIBS = libgtest.a libgtest_main.a libgmock.a libgmock_main.a
+CXXFLAGS += -g -Wall -Wextra -pthread
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
@@ -59,10 +53,10 @@ GMOCK_HEADERS = $(GMOCK_DIR)/include/gmock/*.h \
# House-keeping build targets.
-all : $(GTEST_LIBS) $(TESTS)
+all : $(TESTS)
clean :
- rm -f $(GTEST_LIBS) $(TESTS) *.o
+ rm -f $(TESTS) gmock.a gmock_main.a *.o
# Builds gmock.a and gmock_main.a. These libraries contain both
# Google Mock and Google Test. A test should link with either gmock.a
@@ -84,10 +78,6 @@ gtest-all.o : $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CXXFLAGS) \
-c $(GTEST_DIR)/src/gtest-all.cc
-gtest_main.o : $(GTEST_SRCS_)
- $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CXXFLAGS) \
- -c $(GTEST_DIR)/src/gtest_main.cc
-
gmock-all.o : $(GMOCK_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CXXFLAGS) \
-c $(GMOCK_DIR)/src/gmock-all.cc
@@ -96,16 +86,10 @@ gmock_main.o : $(GMOCK_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CXXFLAGS) \
-c $(GMOCK_DIR)/src/gmock_main.cc
-libgtest.a : gtest-all.o
- $(AR) $(ARFLAGS) $@ $^
-
-libgtest_main.a : gtest_main.o
- $(AR) $(ARFLAGS) $@ $^
-
-libgmock.a : gmock-all.o
+gmock.a : gmock-all.o gtest-all.o
$(AR) $(ARFLAGS) $@ $^
-libgmock_main.a : gmock_main.o
+gmock_main.a : gmock-all.o gtest-all.o gmock_main.o
$(AR) $(ARFLAGS) $@ $^
# Builds a sample test.
@@ -113,5 +97,5 @@ libgmock_main.a : gmock_main.o
gmock_test.o : $(USER_DIR)/gmock_test.cc $(GMOCK_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/gmock_test.cc
-gmock_test : gmock_test.o $(GTEST_LIBS)
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -L$(GTEST_LIB_DIR) -lgmock -lpthread $^ -o $@
+gmock_test : gmock_test.o gmock_main.a
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@