Skip to content

Commit

Permalink
MinGW: Support measuring the code coverage
Browse files Browse the repository at this point in the history
Extracted from vim#6795.

This adds `COVERAGE=yes` option to Make_cyg_ming.mak.
This makes someone measure the code coverage easily on MS-Windows on a
local PC.
  • Loading branch information
k-takata committed Sep 3, 2020
1 parent 62f93f4 commit 4e1c133
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Make_cyg_ming.mak
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ DEBUG=no
# set to yes to create a mapfile
#MAP=yes

# set to yes to measure code coverage
COVERAGE=no

# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
OPTIMIZE=MAXSPEED

Expand Down Expand Up @@ -700,6 +703,11 @@ CFLAGS += -O2
LFLAGS += -s
endif

ifeq ($(COVERAGE),yes)
CFLAGS += --coverage
LFLAGS += --coverage
endif

LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion
GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o
CUIOBJ = $(OUTDIR)/iscygpty.o
Expand Down Expand Up @@ -938,6 +946,9 @@ EXELFLAGS += -municode
ifneq ($(DEBUG),yes)
EXELFLAGS += -s
endif
ifeq ($(COVERAGE),yes)
EXELFLAGS += --coverage
endif
DEFINES += $(DEF_GUI) -DVIMDLL
OBJ += $(GUIOBJ) $(CUIOBJ)
OUTDIR = dobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
Expand Down

0 comments on commit 4e1c133

Please sign in to comment.