diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/stringrange.h | 33 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/commands.h | 1 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/visualstudio.h | 12 |
3 files changed, 45 insertions, 1 deletions
diff --git a/toolsrc/include/vcpkg/base/stringrange.h b/toolsrc/include/vcpkg/base/stringrange.h new file mode 100644 index 000000000..94bd584af --- /dev/null +++ b/toolsrc/include/vcpkg/base/stringrange.h @@ -0,0 +1,33 @@ +#pragma once + +#include <vcpkg/base/optional.h> + +#include <string> +#include <vector> + +namespace vcpkg +{ + struct VcpkgStringRange + { + static std::vector<VcpkgStringRange> find_all_enclosed(const VcpkgStringRange& input, + const std::string& left_delim, + const std::string& right_delim); + + static VcpkgStringRange find_exactly_one_enclosed(const VcpkgStringRange& input, + const std::string& left_tag, + const std::string& right_tag); + + static Optional<VcpkgStringRange> find_at_most_one_enclosed(const VcpkgStringRange& input, + const std::string& left_tag, + const std::string& right_tag); + + VcpkgStringRange() = default; + VcpkgStringRange(const std::string& s); // Implicit by design + VcpkgStringRange(const std::string::const_iterator begin, const std::string::const_iterator end); + + std::string::const_iterator begin; + std::string::const_iterator end; + + std::string to_string() const; + }; +} diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 21e77aa52..e4ea44334 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -139,7 +139,6 @@ namespace vcpkg::Commands namespace Fetch { - std::vector<Toolset> find_toolset_instances_preferred_first(const VcpkgPaths& paths); fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg/visualstudio.h b/toolsrc/include/vcpkg/visualstudio.h new file mode 100644 index 000000000..b93b145d9 --- /dev/null +++ b/toolsrc/include/vcpkg/visualstudio.h @@ -0,0 +1,12 @@ +#pragma once
+
+#if defined(_WIN32)
+
+#include <vcpkg/vcpkgpaths.h>
+
+namespace vcpkg::VisualStudio
+{
+ std::vector<Toolset> find_toolset_instances_preferred_first(const VcpkgPaths& paths);
+}
+
+#endif
|
