-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
45 lines (33 loc) · 1.16 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
TARGET=ddb
COMPILER=/usr/bin/clang++-18
.PHONY: clean configure configure-asan configure-release compile compile-asan compile-release test diff
configure:
export CXX=$(COMPILER) && cmake -S . -B build
configure-asan:
export CXX=$(COMPILER) && cmake -S . -B build-asan -DCMAKE_BUILD_TYPE=ASAN
configure-release:
export CXX=$(COMPILER) && cmake -S . -B build-release -DCMAKE_BUILD_TYPE=release
compile: configure
cmake --build build
cp build/compile_commands.json compile_commands.json
compile-asan: configure-asan
cmake --build build-asan
cp build-asan/compile_commands.json compile_commands.json
compile-release: configure-release
cmake --build build-release
cp build-release/compile_commands.json compile_commands.json
test:
./build$(TYPE)/$(TARGET)-test --gtest_filter="$(TEST).*"
perf: compile-release
./build-release/$(TARGET)-test --gtest_filter="Performance.$(TEST)" 2> $(TEST).csv
python3 ./tests/performance.py $(TEST)
rm -rf $(TEST).csv
diff:
git diff --stat 2f47bd9c4758c96e2479a78f26dc9071bd4f365b HEAD -- ':!LICENSE'
clean:
rm -rf build
rm -rf build-asan
rm -rf build-release
rm -rf .cache
rm -rf compile_commands.json
rm -rf test.data