aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/system.h24
-rw-r--r--toolsrc/include/vcpkg/vcpkglib.h15
2 files changed, 24 insertions, 15 deletions
diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h
index 9f2d91435..db537db4b 100644
--- a/toolsrc/include/vcpkg/base/system.h
+++ b/toolsrc/include/vcpkg/base/system.h
@@ -10,6 +10,28 @@ namespace vcpkg::System
fs::path get_exe_path_of_current_process();
+ struct CMakeVariable
+ {
+ CMakeVariable(const CStringView varname, const char* varvalue);
+ CMakeVariable(const CStringView varname, const std::string& varvalue);
+ CMakeVariable(const CStringView varname, const fs::path& path);
+
+ std::string s;
+ };
+
+ std::string make_cmake_cmd(const fs::path& cmake_exe,
+ const fs::path& cmake_script,
+ const std::vector<CMakeVariable>& pass_variables);
+
+ struct PowershellParameter
+ {
+ PowershellParameter(const CStringView varname, const char* varvalue);
+ PowershellParameter(const CStringView varname, const std::string& varvalue);
+ PowershellParameter(const CStringView varname, const fs::path& path);
+
+ std::string s;
+ };
+
struct ExitCodeAndOutput
{
int exit_code;
@@ -24,7 +46,7 @@ namespace vcpkg::System
std::string powershell_execute_and_capture_output(const std::string& title,
const fs::path& script_path,
- const CStringView args = "");
+ const std::vector<PowershellParameter>& parameters = {});
enum class Color
{
diff --git a/toolsrc/include/vcpkg/vcpkglib.h b/toolsrc/include/vcpkg/vcpkglib.h
index 9a7fdb861..3c8e676bf 100644
--- a/toolsrc/include/vcpkg/vcpkglib.h
+++ b/toolsrc/include/vcpkg/vcpkglib.h
@@ -20,18 +20,5 @@ namespace vcpkg
std::vector<StatusParagraphAndAssociatedFiles> get_installed_files(const VcpkgPaths& paths,
const StatusParagraphs& status_db);
- struct CMakeVariable
- {
- CMakeVariable(const CStringView varname, const char* varvalue);
- CMakeVariable(const CStringView varname, const std::string& varvalue);
- CMakeVariable(const CStringView varname, const fs::path& path);
-
- std::string s;
- };
-
- std::string make_cmake_cmd(const fs::path& cmake_exe,
- const fs::path& cmake_script,
- const std::vector<CMakeVariable>& pass_variables);
-
- std::string shorten_text(const std::string& desc, size_t length);
+ std::string shorten_text(const std::string& desc, const size_t length);
} // namespace vcpkg