From 16e2509100611447887f6050a5eb1c21ac9170c4 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Fri, 12 Oct 2012 21:25:12 +0200 Subject: Added gtest based test cases to be executed after every compile --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 34c4105..ac857b2 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ -LIB_FILES = tree.cpp parser.cpp +LIB_FILES = tree.cpp parser.cpp PROG_FILES = main.cpp +TEST_FILES = test.cpp -all: parser +all: parser test parser: $(PROG_FILES) $(LIB_FILES) - g++ -O2 -g -o parser $(PROG_FILES) $(LIB_FILES) + g++ -O2 -g -o bin/parser $(PROG_FILES) $(LIB_FILES) + +test: $(LIB_FILES) $(TEST_FILES) + g++ -o bin/test -lgtest $(LIB_FILES) $(TEST_FILES) + ./bin/test -- cgit v1.2.3