-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 944 Bytes
/
Makefile
File metadata and controls
31 lines (24 loc) · 944 Bytes
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
build: test_simple test_simple_opt test_ubsan
test_simple: tests/string_test.cpp src/string.h
clang++ -std=c++20 -gdwarf-4 -O0 -Wall -Wextra -Werror -o ./test_simple tests/string_test.cpp src/string.cpp
test_simple_opt: tests/string_test.cpp src/string.h
clang++ -std=c++20 -O2 -Wall -Wextra -Werror -o ./test_simple_opt tests/string_test.cpp src/string.cpp
test_ubsan: tests/string_test.cpp src/string.h
clang++ -std=c++20 -g -O0 -Wall -Wextra -Werror -fsanitize=undefined -o ./test_ubsan tests/string_test.cpp src/string.cpp
info:
clang++ --version
valgrind --version
run: build
@echo 'Run tests (simple)'
time ./test_simple
@echo 'Run tests (simple_opt)'
time ./test_simple_opt
@echo 'Run tests (ubsan)'
time ./test_ubsan
@echo 'Run tests (valgrind)'
time valgrind --leak-check=yes ./test_simple
test: info run
@echo 'Great job!'
clean:
rm test_simple test_simple_opt test_ubsan
rm -rf test_simple.dSYM test_ubsan.dSYM