From 2990e08c5de45cf38578c447e3d8eb6940e92457 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Fri, 26 Jul 2019 10:14:13 -0700 Subject: [PATCH] Set make-clone c compile options for all platforms I realized that it didn't make sense to specify these just for linux even though they work fine with the version of gcc that runs on my mac. I also ran scalafmt on this file. --- sbt/src/sbt-test/nio/make-clone/build.sbt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbt/src/sbt-test/nio/make-clone/build.sbt b/sbt/src/sbt-test/nio/make-clone/build.sbt index 8bee73e73..05327cb25 100644 --- a/sbt/src/sbt-test/nio/make-clone/build.sbt +++ b/sbt/src/sbt-test/nio/make-clone/build.sbt @@ -2,7 +2,7 @@ import java.nio.file.{ Files, Path } import scala.sys.process._ val compileOpts = settingKey[Seq[String]]("Extra compile options") -compileOpts := { if (scala.util.Properties.isLinux) "-fPIC" :: "-std=gnu99" :: Nil else Nil } +compileOpts := { "-fPIC" :: "-std=gnu99" :: Nil } val compileLib = taskKey[Seq[Path]]("Compile the library") compileLib / sourceDirectory := sourceDirectory.value / "lib" compileLib / fileInputs := { @@ -31,7 +31,8 @@ compileLib := { Files.createDirectories(objectDir) def extensionFilter(ext: String): Path => Boolean = _.getFileName.toString.endsWith(s".$ext") val cFiles: Seq[Path] = - if (changedFiles.fold(false)(_.exists(extensionFilter("h")))) allFiles.filter(extensionFilter("c")) + if (changedFiles.fold(false)(_.exists(extensionFilter("h")))) + allFiles.filter(extensionFilter("c")) else changedFiles.getOrElse(allFiles).filter(extensionFilter("c")) cFiles.map { file => val outFile = objectDir.resolve(objectFileName(file))