String interpolation would actually prettify this a bit:
  s"-D${k}=\"${v}\""