Commit Graph

1 Commits

Author SHA1 Message Date
Marc Herbert 11592fed5b version.cmake: switch SOF_MAJOR etc. to a new, static `versions.json`
As discussed in #6952, relying on `git describe` for defining SOF_MAJOR
and friends is very brittle and unreliable. Switch to a static
versions.json file instead.

Note the full `git describe --tags` output is _still_ present in the
binary, this is useful and left unchanged. It's just not used any more
to guess SOF_MAJOR, SOF_MINOR and SOF_MICRO.

Use JSON because CMake and pretty much every other piece of software has
a JSON parser out of the box.

This aligns with linux/Makefile, Zephyr/VERSIONS and probably many
others. - except we use JSON because we're in 2023 so we don't spend
time having fun re-implementing parsers any more.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-04 16:57:28 +03:00