-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (48 loc) · 1.36 KB
/
Makefile
File metadata and controls
53 lines (48 loc) · 1.36 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
52
53
generate: clean
cmake -S . -B build -DUSE_APL=1 -DBUILD_TESTS=1
build: generate
cd build && cmake --build . --target all
clean:
rm -rf ./build*
build-all-configs:
@set -e; \
for use_apl in 0 1; do \
for build_tests in 0 1; do \
build_dir="build-$${use_apl}-$${build_tests}"; \
printf "USE_APL=%s BUILD_TESTS=%s ... " "$$use_apl" "$$build_tests"; \
if cmake -S . -B "$$build_dir" \
-DUSE_APL=$$use_apl \
-DBUILD_TESTS=$$build_tests \
> /dev/null 2>&1 && \
cmake --build "$$build_dir" --target all -- -s \
> /dev/null 2>&1; then \
echo "OK"; \
else \
echo "FAILED"; \
exit 1; \
fi; \
done; \
done
run-all-binaries:
@failed=0; \
for dir in build-0-0 build-0-1 build-1-0 build-1-1; do \
[ -d "$$dir" ] || continue; \
for bin in \
"$$dir/src/main" \
"$$dir/src/main_with_apl" \
"$$dir/tests/generate_visualization_baseline" \
"$$dir/tests/generate_visualization_with_apl" \
"$$dir/tests/sweep_microbench_baseline" \
"$$dir/tests/sweep_microbench_with_apl"; do \
[ -x "$$bin" ] || continue; \
printf "RUN %s ... " "$$bin"; \
if "$$bin" > /dev/null 2>&1; then \
echo "OK"; \
else \
echo "FAILED"; \
failed=1; \
fi; \
done; \
done; \
exit $$failed
check-all: clean build-all-configs run-all-binaries