-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
73 lines (63 loc) · 2.52 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
CARGO_CMD ?= cargo
RUST_VERSION=$(shell rustc --version)
RUST_NIGHTLY = $(findstring nightly,$(RUST_VERSION))
test:
ifeq ($(RUST_NIGHTLY), nightly)
$(MAKE) run-all TASK="test"
$(CARGO_CMD) clean
$(CARGO_CMD) test --manifest-path vector/Cargo.toml --no-default-features --lib
$(CARGO_CMD) clean
$(CARGO_CMD) test --no-default-features --features std,use_sse2,matrix
$(CARGO_CMD) clean
$(CARGO_CMD) test --no-default-features --features std,use_avx2,matrix
else
$(MAKE) run-all TASK="test"
endif
bench:
ifeq ($(RUST_NIGHTLY), nightly)
$(CARGO_CMD) bench
else
@echo "Bench requires Rust nigthly, skipping bench for $(RUST_VERSION)"
endif
clean:
$(MAKE) run-all TASK="clean"
update:
$(MAKE) run-all TASK="update"
build:
$(MAKE) run-all TASK="build"
format:
cargo fmt
cargo fmt --manifest-path vector/Cargo.toml
cargo fmt --manifest-path matrix/Cargo.toml
cargo fmt --manifest-path interop/Cargo.toml
build_all: build
ifeq ($(RUST_NIGHTLY), nightly)
$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std
$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std,use_sse2
$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std,use_avx2
$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features
else
$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features --features std
$(CARGO_CMD) clean --manifest-path vector/Cargo.toml
$(CARGO_CMD) build --manifest-path vector/Cargo.toml --no-default-features
endif
test_all: test
ifeq ($(RUST_NIGHTLY), nightly)
$(CARGO_CMD) clean
$(CARGO_CMD) test --manifest-path vector/Cargo.toml --no-default-features --lib
$(CARGO_CMD) test --no-default-features --features std,use_sse2,matrix
$(CARGO_CMD) test --no-default-features --features std,use_avx2,matrix
else
$(CARGO_CMD) clean
$(CARGO_CMD) test --manifest-path vector/Cargo.toml --features matrix --no-default-features --lib
endif
run-all:
$(CARGO_CMD) $(TASK) --no-default-features --features std,matrix
$(CARGO_CMD) $(TASK) --manifest-path vector/Cargo.toml --no-default-features --features std
$(CARGO_CMD) $(TASK) --manifest-path matrix/Cargo.toml
$(CARGO_CMD) $(TASK) --manifest-path interop/Cargo.toml