[M5+] add resolver::conan_probe
This commit is contained in:
13
CHANGELOG.md
13
CHANGELOG.md
@@ -78,6 +78,19 @@ 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::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)
|
||||
and feeds it through `parse_conanfile`. Pure parser handles both the
|
||||
modern `set_property("cmake_target_name", "...")` form and the legacy
|
||||
`names["cmake_find_package"] = "..."` form, derives the missing field
|
||||
from the other when only one is set, normalizes bare names into the
|
||||
canonical `<file>::<target>` shape, and substitutes Python f-string
|
||||
`{...}` placeholders with the cmake_file_name so recipes like fmt's
|
||||
`f"fmt::{target}"` parse correctly. `tests/conan_probe_parse.cpp`
|
||||
covers 6 cases; `tests/conan_probe_live.cpp` (gated by
|
||||
`CARGOXX_NETWORK_TESTS=1`) verifies fmt and a 404 path against the
|
||||
real conan-center-index.
|
||||
- `cargoxx.resolver::nix_cmake_scan(store_path, package_name)` — walks
|
||||
`<store_path>/lib/cmake/**` for `*Config.cmake` / `*-config.cmake`
|
||||
files, scans them and their sibling `.cmake` files (e.g. the
|
||||
|
||||
Reference in New Issue
Block a user