Conditional scalacOptions with SBT
问题 I am using a project with cross-build for Scala 2.8, 2.9 and (hopefully) 2.10, using SBT. I would like to add the -feature option when compiling with 2.10 only. In other words, when I compile with a version smaller than 2.10.0, I would like to set the compiler options as: scalacOptions ++= Seq( "-deprecation", "-unchecked" ) and when compiling with a version greater or equal than 2.10.0: scalacOptions ++= Seq( "-deprecation", "-unchecked", "-feature" ) Is there a way to achieve this ? 回答1: