aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorras0219 <robertallenschumacher@gmail.com>2020-07-01 11:36:09 -0700
committerGitHub <noreply@github.com>2020-07-01 11:36:09 -0700
commit135f91de1eef9e906eb7a5bcf323f6eff9a2b5da (patch)
tree71dfb029d57d3a205a8685bd357586148480d09c /toolsrc/include
parent42f70a42766ff3da9c0464dd78f1eed0e8ac3789 (diff)
downloadvcpkg-135f91de1eef9e906eb7a5bcf323f6eff9a2b5da.tar.gz
vcpkg-135f91de1eef9e906eb7a5bcf323f6eff9a2b5da.zip
[vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and `x-set-installed` (#12138)
* [vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and `x-set-installed`. * [vcpkg] Add end-to-end testing suite for install, remove, and binary caching * [vcpkg] Define `$TestingRoot in end-to-end-tests.ps1 * [vcpkg] Address CR comments Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/files.h4
-rw-r--r--toolsrc/include/vcpkg/binarycaching.h5
-rw-r--r--toolsrc/include/vcpkg/binarycaching.private.h11
-rw-r--r--toolsrc/include/vcpkg/commands.h3
4 files changed, 17 insertions, 6 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h
index dce9584fa..7676b49a0 100644
--- a/toolsrc/include/vcpkg/base/files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -201,4 +201,8 @@ namespace vcpkg::Files
bool has_invalid_chars_for_filesystem(const std::string& s);
void print_paths(const std::vector<fs::path>& paths);
+
+ /// Performs "lhs / rhs" according to the C++17 Filesystem Library Specification.
+ /// This function exists as a workaround for TS implementations.
+ fs::path combine(const fs::path& lhs, const fs::path& rhs);
}
diff --git a/toolsrc/include/vcpkg/binarycaching.h b/toolsrc/include/vcpkg/binarycaching.h
index 61af79a3f..c1db1f169 100644
--- a/toolsrc/include/vcpkg/binarycaching.h
+++ b/toolsrc/include/vcpkg/binarycaching.h
@@ -39,8 +39,7 @@ namespace vcpkg
virtual void push_failure(const VcpkgPaths& paths, const std::string& abi_tag, const PackageSpec& spec) = 0;
/// Requests the result of `try_restore()` without actually downloading the package. Used by CI to determine
/// missing packages.
- virtual RestoreResult precheck(const VcpkgPaths& paths,
- const Dependencies::InstallPlanAction& action) = 0;
+ virtual RestoreResult precheck(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action) = 0;
};
IBinaryProvider& null_binary_provider();
@@ -50,5 +49,7 @@ namespace vcpkg
ExpectedS<std::unique_ptr<IBinaryProvider>> create_binary_provider_from_configs_pure(const std::string& env_string,
View<std::string> args);
+ std::string generate_nuget_packages_config(const Dependencies::ActionPlan& action);
+
void help_topic_binary_caching(const VcpkgPaths& paths);
}
diff --git a/toolsrc/include/vcpkg/binarycaching.private.h b/toolsrc/include/vcpkg/binarycaching.private.h
index f1fd046de..f20a0db12 100644
--- a/toolsrc/include/vcpkg/binarycaching.private.h
+++ b/toolsrc/include/vcpkg/binarycaching.private.h
@@ -36,9 +36,6 @@ namespace vcpkg
struct XmlSerializer
{
- std::string buf;
- int indent = 0;
-
XmlSerializer& emit_declaration();
XmlSerializer& open_tag(StringLiteral sl);
XmlSerializer& start_complex_open_tag(StringLiteral sl);
@@ -49,6 +46,14 @@ namespace vcpkg
XmlSerializer& text(StringView sv);
XmlSerializer& simple_tag(StringLiteral tag, StringView content);
XmlSerializer& line_break();
+
+ std::string buf;
+
+ private:
+ XmlSerializer& emit_pending_indent();
+
+ int m_indent = 0;
+ bool m_pending_indent = false;
};
} \ No newline at end of file
diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h
index b73e91fe7..cec9237f5 100644
--- a/toolsrc/include/vcpkg/commands.h
+++ b/toolsrc/include/vcpkg/commands.h
@@ -163,7 +163,8 @@ namespace vcpkg::Commands
const CMakeVars::CMakeVarProvider& cmake_vars,
const std::vector<FullPackageSpec>& specs,
const Build::BuildPackageOptions& install_plan_options,
- DryRun dry_run);
+ DryRun dry_run,
+ const Optional<fs::path>& pkgsconfig_path);
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet);
}