[M5+] add resolver::vcpkg_probe

This commit is contained in:
2026-05-10 10:23:57 +00:00
parent e5c173b466
commit 941d5b3284
8 changed files with 319 additions and 2 deletions

View File

@@ -78,6 +78,15 @@ All notable changes to cargoxx will be documented in this file.
and `[build]` honoring `warnings_as_errors` and `sanitizers`. Source
paths emitted relative to `build/` (i.e. prefixed with `../`).
Output is deterministic. `tests/codegen_cmake.cpp` covers 11 cases.
- `cargoxx.resolver::vcpkg_probe(name)` — fetches
`https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/<name>/usage`
and feeds it through `parse_vcpkg_usage`. The pure parser extracts
the first `find_package(...)` arg block, adds `REQUIRED` if absent,
and gathers `target_link_libraries` targets that contain `::` (skips
generator expressions and bare names). `tests/vcpkg_probe_parse.cpp`
covers 6 cases; `tests/vcpkg_probe_live.cpp` (gated by
`CARGOXX_NETWORK_TESTS=1`) verifies fmt + a 404 path against real
microsoft/vcpkg ports.
- `cargoxx.resolver::conan_probe(name)` — fetches
`https://raw.githubusercontent.com/conan-io/conan-center-index/master/recipes/<name>/all/conanfile.py`
via `curl` (text-only — never executes Python, per `SPEC.md` §14)