diff options
| author | Billy O'Neal <bion@microsoft.com> | 2021-02-03 11:11:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-03 11:11:27 -0800 |
| commit | ba03ad7c9d2f3b0467229055bebf5b7251f15045 (patch) | |
| tree | 2296cc734c7f2667910d81455dce5fe4780a2778 /toolsrc/include | |
| parent | dc4d1b735aca2aa3ef0582ab2e420031fd24a402 (diff) | |
| download | vcpkg-ba03ad7c9d2f3b0467229055bebf5b7251f15045.tar.gz vcpkg-ba03ad7c9d2f3b0467229055bebf5b7251f15045.zip | |
[vcpkg] Apply fixes needed to extract vcpkg-tool (#16012)
utilities.cmake: Disable warnings that are firing on Azure Pipelines CI machines due to different Clang version.
expected.h: Fix a bug I introduced in https://github.com/microsoft/vcpkg/pull/15638/ because I was under the impression expected worked like optional (in that value_or_exit for it should be treated as a program bug)
build.cpp: Add (void)s to silence warnings.
binarycaching.cpp: Repair assumption that the current directory is C: which isn't true on the Hosted Azure Pipelines agents.
others: Make unit tests respect %VCPKG_ROOT%, as necessary in the vcpkg_tool repo. Note that this required splitting vcpkgcmdarguments::ImbueFromEnvironment into the once-only process modifying part and the just imbue from environment part.
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/expected.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/vcpkgcmdarguments.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h index 13e70057d..f24366c4a 100644 --- a/toolsrc/include/vcpkg/base/expected.h +++ b/toolsrc/include/vcpkg/base/expected.h @@ -229,7 +229,7 @@ namespace vcpkg if (m_s.has_error()) { System::print2(System::Color::error, m_s.to_string(), "\n"); - Checks::unreachable(line_info); + Checks::exit_fail(line_info); } } diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 365f892a0..14208e926 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -212,7 +212,6 @@ namespace vcpkg } bool output_json() const { return json.value_or(false); } - bool is_recursive_invocation() const { return m_is_recursive_invocation; } std::string command; std::vector<std::string> command_arguments; @@ -221,13 +220,16 @@ namespace vcpkg void imbue_from_environment(); + // Applies recursive settings from the environment or sets a global environment variable + // to be consumed by subprocesses; may only be called once per process. + static void imbue_or_apply_process_recursion(VcpkgCmdArguments& args); + void check_feature_flag_consistency() const; void debug_print_feature_flags() const; void track_feature_flag_metrics() const; private: - bool m_is_recursive_invocation = false; std::unordered_set<std::string> command_switches; std::unordered_map<std::string, std::vector<std::string>> command_options; }; |
