Only activate unittest in test builds
This commit is contained in:
parent
4bcb152c25
commit
f99f30671c
6
makefile
6
makefile
|
@ -1,6 +1,6 @@
|
||||||
SRC := $(shell find src -name "*.d") $(shell find libdparse/src -name "*.d")
|
SRC := $(shell find src -name "*.d") $(shell find libdparse/src -name "*.d")
|
||||||
INCLUDE_PATHS := -Ilibdparse/src
|
INCLUDE_PATHS := -Ilibdparse/src
|
||||||
DMD_FLAGS := -g -w -unittest $(INCLUDE_PATHS)
|
DMD_FLAGS := -g -w $(INCLUDE_PATHS)
|
||||||
LDC_FLAGS := -g -w -oq $(INCLUDE_PATHS)
|
LDC_FLAGS := -g -w -oq $(INCLUDE_PATHS)
|
||||||
|
|
||||||
.PHONY: dmd ldc test
|
.PHONY: dmd ldc test
|
||||||
|
@ -11,9 +11,9 @@ ldc: $(SRC)
|
||||||
ldc2 $(LDC_FLAGS) $(SRC) -ofbin/dfmt
|
ldc2 $(LDC_FLAGS) $(SRC) -ofbin/dfmt
|
||||||
-rm -f *.o
|
-rm -f *.o
|
||||||
|
|
||||||
test: bin/dfmt
|
test:
|
||||||
|
dmd $(DMD_FLAGS) -unittest $(SRC) -ofbin/dfmt
|
||||||
cd tests && ./test.sh
|
cd tests && ./test.sh
|
||||||
|
|
||||||
bin/dfmt: $(SRC)
|
bin/dfmt: $(SRC)
|
||||||
dmd $(DMD_FLAGS) $(SRC) -ofbin/dfmt
|
dmd $(DMD_FLAGS) $(SRC) -ofbin/dfmt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue