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 14, 2019
1 parent 4c7fc7f commit a03d59e
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 a03d59e

Please sign in to comment.