Skip to content

Commit

Permalink
Merge pull request #5211 from WalterBright/unittest
Browse files Browse the repository at this point in the history
add unittest support to makefiles
  • Loading branch information
9rnsr committed Oct 21, 2015
2 parents 52f38f4 + 2e11abc commit 1d8dea2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/posix.mak
Expand Up @@ -165,6 +165,9 @@ endif
ifdef ENABLE_LTO
CFLAGS += -flto
endif
ifdef ENABLE_UNITTEST
DFLAGS += -unittest -cov
endif

# Uniqe extra flags if necessary
DMD_FLAGS := -I$(ROOT) -Wuninitialized
Expand Down Expand Up @@ -312,7 +315,7 @@ endif
clean:
rm -f newdelete.o $(GLUE_OBJS) $(BACK_OBJS) dmd optab.o id.o \
idgen $(idgen_output) optabgen $(optabgen_output) \
verstr.h SYSCONFDIR.imp core *.cov *.deps *.gcda *.gcno *.a
verstr.h SYSCONFDIR.imp core *.cov *.deps *.gcda *.gcno *.a *.lst
@[ ! -d ${PGO_DIR} ] || echo You should issue manually: rm -rf ${PGO_DIR}

######## Download and install the last dmd buildable without dmd
Expand Down
5 changes: 4 additions & 1 deletion src/win32.mak
Expand Up @@ -266,6 +266,9 @@ reldmd:
trace:
$(DMDMAKE) "OPT=-o" "DEBUG=-gt -Nc" "DDEBUG=-debug -g -unittest" "DOPT=" "LFLAGS=-L/ma/co/delexe/la" $(TARGETEXE)

unittest:
$(DMDMAKE) "OPT=-o" "DEBUG=" "DDEBUG=-debug -g -unittest -cov" "DOPT=" "LFLAGS=-L/ma/co/delexe/la" $(TARGETEXE)

################################ Libraries ##################################

glue.lib : $(GLUEOBJ)
Expand All @@ -285,7 +288,7 @@ $(TARGETEXE): $(DMD_SRCS) $(ROOT_SRCS) newdelete.obj $(LIBS) verstr.h
############################ Maintenance Targets #############################

clean:
$(DEL) *.obj *.lib *.map
$(DEL) *.obj *.lib *.map *.lst
$(DEL) msgs.h msgs.c
$(DEL) elxxx.c cdxxx.c optab.c debtab.c fltables.c tytab.c
$(DEL) id.h id.d
Expand Down

0 comments on commit 1d8dea2

Please sign in to comment.