unittest.mk 447 Bytes
Newer Older
tqchen committed
1 2 3 4 5 6
GTEST_LIB=$(GTEST_PATH)/lib/
GTEST_INC=$(GTEST_PATH)/include/

TEST_SRC = $(wildcard tests/cpp/*_test.cc)
TEST = $(patsubst tests/cpp/%_test.cc, tests/cpp/%_test, $(TEST_SRC))

7
tests/cpp/%_test: tests/cpp/%_test.cc lib/libtvm.so
tqchen committed
8 9
	$(CXX) -std=c++11 $(CFLAGS) -MM -MT tests/cpp/$* $< >tests/cpp/$*.d
	$(CXX) -std=c++11 $(CFLAGS) -I$(GTEST_INC) -o $@ $(filter %.cc %.a, $^)  \
10
		-L$(GTEST_LIB)  $(LDFLAGS) -lgtest -Llib -ltvm
tqchen committed
11 12

-include tests/cpp/*.d