Skip to content

Commit

Permalink
Fix gtest build (apache#13926)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhennanQin authored and lanking520 committed Feb 18, 2019
1 parent 0cac767 commit 08253b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/cpp/unittest.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS)
GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \
$(GTEST_DIR)/include/gtest/internal/*.h

GTEST_FLAGS=-Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=c++11

TEST_CFLAGS = -Itests/cpp/include -Isrc $(CFLAGS)
TEST_LDFLAGS = $(LDFLAGS) -Llib -lmxnet

Expand All @@ -36,7 +38,7 @@ endif
.PHONY: runtest testclean

gtest-all.o : $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_INC) -I$(GTEST_DIR) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest-all.cc
$(CXX) $(CPPFLAGS) $(GTEST_FLAGS) -I$(GTEST_INC) -I$(GTEST_DIR) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest-all.cc

gtest.a : gtest-all.o
$(AR) $(ARFLAGS) $@ $^
Expand Down

0 comments on commit 08253b9

Please sign in to comment.