Skip to content

Commit a1c1635

Browse files
authoredSep 3, 2019
Merge pull request #14 from statiolake/windows-jemallocator
Make the test of jemalloc optional
2 parents 5baaae0 + b93d704 commit a1c1635

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
 

‎Cargo.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ edition = "2018"
99
name = "main"
1010
path = "src/main.rs"
1111

12+
[features]
13+
jemalloc = ["jemalloc-ctl", "jemallocator"]
14+
default = ["jemalloc"]
15+
1216
[dependencies]
1317
# AtCoder 2019年言語アップデート以降に使用できるクレート
1418

@@ -70,8 +74,14 @@ ndarray = "=0.12.1"
7074
nalgebra = "=0.18.1"
7175

7276
# 代替ヒープアロケータ。条件によってはシステムアロケータより速いことも
73-
jemallocator = "=0.3.2"
74-
jemalloc-ctl = "=0.3.3"
77+
[target.'cfg(not(windows))'.dependencies]
78+
jemallocator = { version = "=0.3.2", optional = true }
79+
jemalloc-ctl = { version = "=0.3.3", optional = true }
80+
81+
[[test]]
82+
name = "jemallocator"
83+
path = "tests/test_jemallocator.rs"
84+
required-features = ["jemalloc"]
7585

7686
# ---------------------------------------------------------------------
7787

0 commit comments

Comments
 (0)
Please sign in to comment.