diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-11-02 18:17:21 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-11-02 18:17:21 -0700 |
| commit | 2feea0828ba94d2a365e8825fe799ed12acc6e6c (patch) | |
| tree | 8a9ed5b8ecf656b469d2a1d65ee5738aba5179b6 /toolsrc/include | |
| parent | 6a91d1ece10ce0aeda89c44611d5335a07b8e40d (diff) | |
| download | vcpkg-2feea0828ba94d2a365e8825fe799ed12acc6e6c.tar.gz vcpkg-2feea0828ba94d2a365e8825fe799ed12acc6e6c.zip | |
[vcpkg] Improve `vcpkg help` -- now has per-command help!
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/cstringview.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/export.h | 2 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/help.h | 4 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/vcpkgcmdarguments.h | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index 342455402..0441bc573 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -63,6 +63,8 @@ namespace vcpkg inline bool operator!=(const std::string& l, const CStringView& r) { return l != r.c_str(); } + inline std::string operator+(std::string&& l, const CStringView& r) { return std::move(l) + r.c_str(); } + inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); } static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*"); diff --git a/toolsrc/include/vcpkg/export.h b/toolsrc/include/vcpkg/export.h index f3285e187..eb99b4fb1 100644 --- a/toolsrc/include/vcpkg/export.h +++ b/toolsrc/include/vcpkg/export.h @@ -4,6 +4,8 @@ namespace vcpkg::Export { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths); diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h index 39ad6912d..73549efd7 100644 --- a/toolsrc/include/vcpkg/help.h +++ b/toolsrc/include/vcpkg/help.h @@ -7,13 +7,13 @@ namespace vcpkg::Help { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); void help_topic_valid_triplet(const VcpkgPaths& paths); void print_usage(); - void print_example(const std::string& command_and_arguments); - std::string create_example_string(const std::string& command_and_arguments); } diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index a832caf04..93eeb6ef5 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -49,6 +49,8 @@ namespace vcpkg std::vector<std::string> (*valid_arguments)(const VcpkgPaths& paths); }; + void display_usage(const CommandStructure& command_structure); + #if defined(_WIN32) using CommandLineCharType = wchar_t; #else |
