Commit 4c1dfe4
committed
fix(ci): unblock Windows xmake test link (LNK1561)
xmake's gtest package defaults to `gmock = true`, so with `main = true`
it links `gmock_main.lib` (not `gtest_main.lib`). On Windows, MSVC's
linker doesn't scan inside static libs for the entry point, so it
reports `LNK1561: entry point must be defined`.
- Disable gmock — we don't use it; this switches the linked main
archive to `gtest_main.lib`.
- Add `/WHOLEARCHIVE:gtest_main.lib` on Windows to force the entry
point object into the link, side-stepping MSVC's lazy lib resolution.1 parent 938f934 commit 4c1dfe4
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments