#pragma once #include namespace vcpkg::Test { struct MockCMakeVarProvider : CMakeVars::CMakeVarProvider { using SMap = std::unordered_map; void load_generic_triplet_vars(Triplet triplet) const override { generic_triplet_vars.emplace(triplet, SMap{}); } void load_dep_info_vars(Span specs) const override { for (auto&& spec : specs) dep_info_vars.emplace(spec, SMap{}); } void load_tag_vars(Span specs, const PortFileProvider::PortFileProvider& port_provider) const override { for (auto&& spec : specs) tag_vars.emplace(spec.package_spec, SMap{}); (void)(port_provider); } Optional&> get_generic_triplet_vars( Triplet triplet) const override; Optional&> get_dep_info_vars( const PackageSpec& spec) const override; Optional&> get_tag_vars( const PackageSpec& spec) const override; mutable std::unordered_map> dep_info_vars; mutable std::unordered_map> tag_vars; mutable std::unordered_map> generic_triplet_vars; }; }