-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (41 loc) · 1.13 KB
/
Makefile
File metadata and controls
51 lines (41 loc) · 1.13 KB
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
47
48
49
50
51
default: build
${MAKE} check
e=20 17 14 11 03
e+=patterns
t=features.csv
build: $e $t
clean:
rm -f $e $t || true
rm -f *.gcov *.gcda *.gcno || true
CXXFLAGS+=-Wall -Wno-unused
CXXFLAGS+=-Wextra -Wno-missing-field-initializers
CXXFLAGS+=-Wpedantic
CXXFLAGS+=-Dgcc_extension
CXXFLAGS+=-include features.cpp
CXXFLAGS+=-g -fsanitize=leak
LDLIBS+=-pthread
CXXFLAGS+=--coverage
ifneq (, $(shell which g++-10))
20: CXX=g++-10
20: CXXFLAGS+=-fcoroutines -fconcepts -fgnu-tm
20: CXXFLAGS+=-fconcepts -fgnu-tm
else
20: CXX=clang++-10
20: CXXFLAGS+=-Wno-missing-braces -Wno-unused-parameter
endif
20: CXXFLAGS+=-std=c++2a
17 patterns: CXXFLAGS+=-std=c++17
14: CXXFLAGS+=-std=c++14
11: CXXFLAGS+=-std=c++11
03: CXXFLAGS+=-std=c++03
check: build
rm *.gcda || true
for a in $e; do ./$$a || exit; done
features.csv:
#./03 && ./11 && ./14 && ./17 && ./20
bash -c "export features=1; join --nocheck-order <(join <(join <(join <(./03) <(./11)) <(./14)) <(./17)) <(./20)" \
> $@
coverage: build
${MAKE} check &> /dev/null
for a in $e; do gcov ./$$a 2> /dev/null || exit; done
grep -H '##' *cpp.gcov | sed 's/\.gcov: \+#\+: \+\([0-9]\+\):/:\1: untested:/'