Commit 5af9906
committed
feat: M6.x glob-aware schema (mcpp field) — migrate cmdline + templates + gtest
Aligns with mcpp's M6.x descriptor schema where the `mcpp` field is
optional and accepts three shapes:
- Absent: mcpp default-looks-up <verdir>/mcpp.toml then <verdir>/*/mcpp.toml.
- String: glob-resolvable path to the project's mcpp.toml.
- Table: inline Form B descriptor (paths are globs relative to verdir).
All paths inside the descriptor are now interpreted as globs (* matches
single segment, ** any number) to robustly handle the GitHub tarball
<repo>-<tag>/ wrap layer without depending on mcpp's old "single-subdir
auto-strip" heuristic (which broke when xlings dropped unrelated
extracted artifacts in the same verdir).
Changes:
- mcpplibs.templates.lua: Form A; mcpp field removed (default lookup
handles <verdir>/<repo>-<tag>/mcpp.toml).
- mcpplibs.cmdline.lua: Form B; sources `src/**/*.cppm` → `*/src/**/*.cppm`.
- gtest.lua: NEW. Form B descriptor for gtest 1.15.2; ships the
amalgamated gtest-all.cc + gtest_main.cc as a static lib via:
mcpp = {
sources = { "*/googletest/src/gtest-all.cc",
"*/googletest/src/gtest_main.cc" },
include_dirs = { "*/googletest/include", "*/googletest" },
targets = { ["gtest"] = { kind = "lib" } },
}
This unblocks `[dev-dependencies] gtest = "1.15.2"` in user projects.1 parent 9fccdba commit 5af9906
3 files changed
Lines changed: 59 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
0 commit comments