diff options
| author | Jim Lawson | 2016-10-20 12:36:28 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2016-10-27 12:44:16 -0700 |
| commit | 72d3290ab5c536fef689da1ea719b2876440eadd (patch) | |
| tree | 10037c6d513dabeb41747ecc9fbcd83aca1635ee | |
| parent | 5272db0bc2ab5a1653168906c636b9099a96348b (diff) | |
Existence of unmanaged firrtl.jar, replaces sbt managed dependency.
Since chisel now depends on firrtl, we need a way for super projects (i.e., rocket-chip) to control the actual firrtl package used by chisel.
| -rw-r--r-- | build.sbt | 32 |
1 files changed, 14 insertions, 18 deletions
@@ -64,24 +64,20 @@ lazy val chiselSettings = Seq ( Resolver.sonatypeRepo("releases") ), - libraryDependencies ++= (Seq("firrtl").map { - dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep)) }), - - -/* Bumping "com.novocode" % "junit-interface" % "0.11", causes DelayTest testSeqReadBundle to fail - * in subtly disturbing ways on Linux (but not on Mac): - * - some fields in the generated .h file are re-named, - * - an additional field is added - * - the generated .cpp file has additional differences: - * - different temps in clock_lo - * - missing assignments - * - change of assignment order - * - use of "Tx" vs. "Tx.values" - */ - libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.5" % "test", - libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, - libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.12.4" % "test", - libraryDependencies += "com.github.scopt" %% "scopt" % "3.4.0", + libraryDependencies ++= Seq("firrtl").collect { + // If we have an unmanaged jar file in the lib directory, assume we're to use that, + case dep: String if (java.nio.file.Files.notExists(java.nio.file.Paths.get(s"${unmanagedBase.value}/$dep.jar"))) => + // otherwise let sbt fetch the appropriate version. + "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep)) + // This should really be something like: + // case dep: String if !unmanagedClasspath.value.contains(s"$dep.jar") => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep)) + // but this generates - error: A setting cannot depend on a task + } ++ Seq( + "org.scalatest" %% "scalatest" % "2.2.5" % "test", + "org.scala-lang" % "scala-reflect" % scalaVersion.value, + "org.scalacheck" %% "scalacheck" % "1.12.4" % "test", + "com.github.scopt" %% "scopt" % "3.4.0" + ), // Tests from other projects may still run concurrently. parallelExecution in Test := true, |
