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:
15
auto/extract_version.py
Executable file
15
auto/extract_version.py
Executable 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))
|
||||
|
||||
Reference in New Issue
Block a user