diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-11-20 18:17:24 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-11-20 18:17:24 -0800 |
| commit | 1313a418cfe26d29c7b4ec2f871d93a07e884d10 (patch) | |
| tree | f5f0cc990f44f02315449ba3bab43213be015675 /toolsrc/include | |
| parent | 3d8ba3e775c13816f4c298ba16b8094e2affc4dd (diff) | |
| download | vcpkg-1313a418cfe26d29c7b4ec2f871d93a07e884d10.tar.gz vcpkg-1313a418cfe26d29c7b4ec2f871d93a07e884d10.zip | |
Introduce PowershellParameter to add '' to parameter values.
Also place that and CMakeVariable in System.h
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/system.h | 24 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/vcpkglib.h | 15 |
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 |
