Merge pull request #91 from schmonz/cpp-googletest-1.8-build-fix

With Google Test 1.8.0, I seem to need both libs.
This commit is contained in:
Emily Bache 2018-08-14 08:33:11 +02:00 committed by GitHub
commit 861ed2343a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,9 +65,8 @@ gtest.a : gtest-all.o
gtest_main.a : gtest-all.o gtest_main.o
$(AR) $(ARFLAGS) $@ $^
# Builds a sample test. A test should link with either gtest.a or
# gtest_main.a, depending on whether it defines its own main()
# function.
# Builds a sample test. A test should link with gtest.a, and also
# gtest_main.a if it doesn't define its own main() function.
GildedRose.o : $(USER_DIR)/GildedRose.cc
$(CXX) -c $^
@ -76,7 +75,7 @@ GildedRoseUnitTests.o : $(USER_DIR)/GildedRoseUnitTests.cc \
$(GTEST_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/GildedRoseUnitTests.cc
GildedRose : GildedRoseUnitTests.o GildedRose.o gtest_main.a
GildedRose : GildedRoseUnitTests.o GildedRose.o gtest.a gtest_main.a
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -pthread $^ -o $@
GildedRoseTextTests.o : $(USER_DIR)/GildedRoseTextTests.cc