diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-28 20:11:06 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-28 20:11:06 -0700 |
commit | a49f932b6110bc46e02f80ba4a4264991202cbee (patch) | |
tree | 267edd41549aab49169ec460ccb868436fff15a8 /Makefile | |
parent | 21695288ecb32358034de0eaf56408cc9b994f86 (diff) | |
parent | 6229138d80380d582f16931d36b279807dcb82dd (diff) |
Merge branch 'master' into compact
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -13,6 +13,12 @@ ifeq ($(config),release) CXXFLAGS+=-O3 -DNDEBUG endif +ifeq ($(config),coverage) + CXXFLAGS+=-DNDEBUG + CXXFLAGS+=-fprofile-arcs -ftest-coverage + LDFLAGS+=-fprofile-arcs +endif + ifneq ($(defines),standard) COMMA=, CXXFLAGS+=-D $(subst $(COMMA), -D ,$(defines)) @@ -22,8 +28,16 @@ OBJECTS=$(SOURCES:%=$(BUILD)/%.o) all: $(EXECUTABLE) +ifeq ($(config),coverage) test: $(EXECUTABLE) + @find $(BUILD) -name '*.gcda' | xargs rm ./$(EXECUTABLE) + @gcov -b -c $(BUILD)/src/pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;' + @ls *.gcov | grep -v pugixml.cpp.gcov | xargs rm +else +test: $(EXECUTABLE) + ./$(EXECUTABLE) +endif clean: rm -rf $(BUILD) |