aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-10-27 20:48:14 -0700
committerGitHub <noreply@github.com>2020-10-27 20:48:14 -0700
commita6a1722cfa94caa5db98848679b99377bc5a0112 (patch)
tree0f17c63e4a0551866280600e466f21267c8ae1ce /toolsrc/include
parentc34c4189ebbf0795e1f8e2de562c527a854c8db4 (diff)
downloadvcpkg-a6a1722cfa94caa5db98848679b99377bc5a0112.tar.gz
vcpkg-a6a1722cfa94caa5db98848679b99377bc5a0112.zip
[vcpkg, jsonnet, openssl-uwp] Enable use of the system powershell-core if it is present. (#13805)
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/files.h13
-rw-r--r--toolsrc/include/vcpkg/tools.h1
2 files changed, 12 insertions, 2 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h
index 71e386a5c..607a75c8e 100644
--- a/toolsrc/include/vcpkg/base/files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -234,11 +234,20 @@ namespace vcpkg::Files
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.
+ // 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);
#if defined(_WIN32)
+ constexpr char preferred_separator = '\\';
+#else
+ constexpr char preferred_separator = '/';
+#endif // _WIN32
+
+ // Adds file as a new path element to the end of base, with an additional slash if necessary
+ std::string add_filename(StringView base, StringView file);
+
+#if defined(_WIN32)
fs::path win32_fix_path_case(const fs::path& source);
#endif // _WIN32
}
diff --git a/toolsrc/include/vcpkg/tools.h b/toolsrc/include/vcpkg/tools.h
index f9618a52d..8f0398a5c 100644
--- a/toolsrc/include/vcpkg/tools.h
+++ b/toolsrc/include/vcpkg/tools.h
@@ -18,6 +18,7 @@ namespace vcpkg
static const std::string GIT = "git";
static const std::string MONO = "mono";
static const std::string NINJA = "ninja";
+ static const std::string POWERSHELL_CORE = "powershell-core";
static const std::string NUGET = "nuget";
static const std::string IFW_INSTALLER_BASE = "ifw_installerbase";
static const std::string IFW_BINARYCREATOR = "ifw_binarycreator";