for src: cxx{**}
{
  # Prevent pollution of the symlinked upstream `source` directory and
  # flatten exe paths to create unique target names in this directory
  # (e.g., 'x/y/z' becomes 'x-y-z').
  # A naive approach of building to a parallel directory tree (e.g., 'bin/')
  # is problematic because the directories created by build system during
  # package development in the source tree are not removed by 'b clean'.
  #
  d = $relative($directory($src), [dir_path] source/)
  n = $name($src)
  t = $regex.replace($d/$n, '[/\\]', '-')
  ./: exe{$t}: $src $sol2 testscript
}
