-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcompat.gtest.lua
More file actions
94 lines (91 loc) · 4.26 KB
/
Copy pathcompat.gtest.lua
File metadata and controls
94 lines (91 loc) · 4.26 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
-- M6.x glob-aware Form B descriptor for gtest.
-- All paths inside `mcpp = {}` are GLOBS relative to the verdir
-- (~/.mcpp/registry/data/xpkgs/<idx>-x-gtest/<ver>/). `*` matches any
-- single path segment (so it absorbs the GitHub `<repo>-<tag>/` wrap).
package = {
spec = "1",
namespace = "compat",
name = "gtest",
description = "Google's C++ test framework",
licenses = {"BSD-3-Clause"},
repo = "https://github.com/google/googletest",
type = "package",
xpm = {
linux = {
["1.17.0"] = {
url = "https://github.com/google/googletest/archive/refs/tags/v1.17.0.tar.gz",
sha256 = "65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c",
},
["1.16.0"] = {
url = "https://github.com/google/googletest/archive/refs/tags/v1.16.0.tar.gz",
sha256 = "78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399",
},
["1.15.2"] = {
url = {
GLOBAL = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/gtest/releases/download/1.15.2/gtest-1.15.2.tar.gz",
},
sha256 = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926",
},
},
macosx = {
["1.17.0"] = {
url = "https://github.com/google/googletest/archive/refs/tags/v1.17.0.tar.gz",
sha256 = "65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c",
},
["1.16.0"] = {
url = "https://github.com/google/googletest/archive/refs/tags/v1.16.0.tar.gz",
sha256 = "78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399",
},
["1.15.2"] = {
url = {
GLOBAL = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/gtest/releases/download/1.15.2/gtest-1.15.2.tar.gz",
},
sha256 = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926",
},
},
windows = {
["1.17.0"] = {
url = "https://github.com/google/googletest/archive/refs/tags/v1.17.0.tar.gz",
sha256 = "65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c",
},
["1.16.0"] = {
url = "https://github.com/google/googletest/archive/refs/tags/v1.16.0.tar.gz",
sha256 = "78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399",
},
["1.15.2"] = {
url = {
GLOBAL = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/gtest/releases/download/1.15.2/gtest-1.15.2.tar.gz",
},
sha256 = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926",
},
},
},
mcpp = {
language = "c++23",
sources = {
"*/googletest/src/gtest-all.cc",
"*/googletest/src/gtest_main.cc",
},
include_dirs = {
"*/googletest/include",
"*/googletest",
},
targets = { ["gtest"] = { kind = "lib" } },
-- gtest_main.cc provides its own main(); it must NOT be linked by
-- default (it would collide with a binary's own main, e.g. an app via
-- `mcpp add gtest` + `mcpp build`, or a test that writes its own main).
-- It is listed BOTH in `sources` (so OLD mcpp, which ignores `features`,
-- keeps today's behavior — no regression) AND here under the `main`
-- feature: NEW mcpp treats a feature-listed source as gated → excluded
-- by default, included only when `features = ["main"]` is requested on
-- the gtest dependency. See
-- mcpp .agents/docs/2026-06-25-gtest-main-feature-and-add-dev-design.md.
features = {
["main"] = { sources = { "*/googletest/src/gtest_main.cc" } },
},
deps = { },
},
}