-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
67 lines (58 loc) · 1.82 KB
/
build.sbt
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
lazy val commonSettings = Seq(
name := "TomsOpt",
version := "0.5",
scalaVersion := "2.11.8",
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % "0.12",
"org.scalanlp" %% "breeze-natives" % "0.12"
),
scalacOptions ++= Seq(
// "-Yinline-warnings",
// "-deprecation",
"-optimize"
),
javaOptions in run ++= Seq(
"-Xmx12G",
"-XX:+AggressiveOpts"
// "-XX:+UnlockDiagnosticVMOptions",
// "-XX:+PrintInlining",
)
)
lazy val core = project
.dependsOn(native % Runtime)
.settings(commonSettings)
.settings(target in javah := (sourceDirectory in nativeCompile in native).value / "include")
.settings(libraryDependencies ++= Seq(
"com.github.scopt" %% "scopt" % "3.4.0",
"com.github.aishfenton" %% "vegas" % "0.2.4",
"org.scalatest" %% "scalatest" % "2.2.6" % "test",
"org.scalacheck" %% "scalacheck" % "1.12.5" % "test"
))
lazy val native = project
.settings(commonSettings)
.settings(sourceDirectory in nativeCompile := sourceDirectory.value)
.enablePlugins(JniNative)
lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)
lazy val benchmark = project
.settings(moduleName := "tomsopt-benchmark")
.enablePlugins(JmhPlugin)
.settings(commonSettings)
.settings(noPublishSettings)
.dependsOn(core)
.settings(
// XXX not sure why can't find lib, so needed for now
javaOptions ++= Seq(
"-Djava.library.path=" + (baseDirectory in LocalRootProject).value.getAbsolutePath + "/native/target/native/x86_64-darwin/bin"
)
)
addCommandAlias("bench", "benchmark/jmh:run -i 4 -wi 4 -f1 EndToEnd")
lazy val root = (project in file("."))
.aggregate(core, benchmark)
.settings(commonSettings)
// Clears screen between refreshes in continuous mode
maxErrors := 5
triggeredMessage := Watched.clearWhenTriggered