-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Disable Print Directory
ifndef VERBOSE
MAKEFLAGS += --no-print-directory
endif
.PHONY: build build-win debug run test clean cov
all: clean build run
build:
# cmake -S . -B build -DCMAKE_VERBOSE_MAKEFILE=ON
cmake -S . -B build
cmake --build build --clean-first
debug:
cmake -S . -B build -DCMAKE_BUILD_TYPE:STRING=Debug
cmake --build build --clean-first
cov:
cmake -S . -B build-cov -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_COV=ON
cmake --build build-cov --clean-first
cmake --build build-cov --target coverage
run: debug
./build/src/cli/mylang $(ARGS)
test: debug
ctest --test-dir build --output-on-failure
valgrind: debug
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt $(ARGS)
diff:
rm -f diff.html
git diff HEAD | ./dependencies/diff2html.sh > diff.html
diff-cmt:
rm -f diff.html
git diff HEAD^ HEAD | ./dependencies/diff2html.sh > diff.html
clean:
rm -rf build*
build-win:
cmake -S . -B build-win -DCMAKE_TOOLCHAIN_FILE=.toolchains/win-x64-static.cmake
cmake --build build-win --clean-first