build(cmake): add platform metadata support
This commit introduces the schema for a new "platform metadata file"
(`platform.json`). This file is expected to exist for each platform
within its source directory, and contains structured information
relevant to the platform.
For now, the platform metadata file only contains the name of the
platform's build system target. For example, the platform *MyPlatform*
might use:
```json
{
"target": "my-platform"
}
```
This target name follows the following regular expression:
```
^(?![0-9])([a-z0-9]+-?)+(?<!-)$
```
Or, in English, it must begin with any ASCII alphabetical lower-case
character, optionally followed by any number of ASCII alphabetical
lower-case characters or numbers (which may be separated by a hyphen),
and may not end with a hyphen.
Change-Id: I5b4ee7cc1f6ad9b64e4e6948216d3736635640bf
Signed-off-by: Chris Kay <chris.kay@arm.com>
4 files changed