1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Update Meson build system

The following features from the CMake build have been implemented:
 * Library version retrieved from unity.h.
 * Extension support.
 * Library, header, and package configuration file installation.

This commit is entirely based on existing work by Owen Torres.
This commit is contained in:
Andrew McNulty
2023-02-13 17:22:52 +01:00
parent cd80a79db5
commit 44bc9e6dbe
6 changed files with 94 additions and 6 deletions

15
auto/extract_version.py Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python3
import re
import sys
ver_re = re.compile(r"^#define\s+UNITY_VERSION_(?:MAJOR|MINOR|BUILD)\s+(\d+)$")
version = []
with open(sys.argv[1], "r") as f:
for line in f:
m = ver_re.match(line)
if m:
version.append(m.group(1))
print(".".join(version))