In the build.sbt
file (or where the project is defined if it is in another location), add the following setting:
scalacOptions += "-language:experimental.macros"
For instance, a project might be defined like this:
lazy val main = project.in(file(".")) // root project
.settings(scalacOptions += "-language:experimental.macros",
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full))
In the above example, the paradise
plugin is included in order to provide complete support of Scala 2.10.x
.