зеркало из https://github.com/microsoft/vcpkg.git
Use cwstring_view in CMakeVariable
This commit is contained in:
Родитель
60445c1150
Коммит
a7c13ce724
|
@ -24,10 +24,10 @@ namespace vcpkg
|
|||
|
||||
struct CMakeVariable
|
||||
{
|
||||
CMakeVariable(const std::wstring& varname, const wchar_t* varvalue);
|
||||
CMakeVariable(const std::wstring& varname, const std::string& varvalue);
|
||||
CMakeVariable(const std::wstring& varname, const std::wstring& varvalue);
|
||||
CMakeVariable(const std::wstring& varname, const fs::path& path);
|
||||
CMakeVariable(const cwstring_view varname, const wchar_t* varvalue);
|
||||
CMakeVariable(const cwstring_view varname, const std::string& varvalue);
|
||||
CMakeVariable(const cwstring_view varname, const std::wstring& varvalue);
|
||||
CMakeVariable(const cwstring_view varname, const fs::path& path);
|
||||
|
||||
std::wstring s;
|
||||
};
|
||||
|
|
|
@ -215,10 +215,10 @@ namespace vcpkg
|
|||
return installed_files;
|
||||
}
|
||||
|
||||
CMakeVariable::CMakeVariable(const std::wstring& varname, const wchar_t* varvalue) : s(Strings::wformat(LR"("-D%s=%s")", varname, varvalue)) { }
|
||||
CMakeVariable::CMakeVariable(const std::wstring& varname, const std::string& varvalue) : CMakeVariable(varname, Strings::utf8_to_utf16(varvalue).c_str()) { }
|
||||
CMakeVariable::CMakeVariable(const std::wstring& varname, const std::wstring& varvalue) : CMakeVariable(varname, varvalue.c_str()) {}
|
||||
CMakeVariable::CMakeVariable(const std::wstring& varname, const fs::path& path) : CMakeVariable(varname, path.generic_wstring()) {}
|
||||
CMakeVariable::CMakeVariable(const cwstring_view varname, const wchar_t* varvalue) : s(Strings::wformat(LR"("-D%s=%s")", varname, varvalue)) { }
|
||||
CMakeVariable::CMakeVariable(const cwstring_view varname, const std::string& varvalue) : CMakeVariable(varname, Strings::utf8_to_utf16(varvalue).c_str()) { }
|
||||
CMakeVariable::CMakeVariable(const cwstring_view varname, const std::wstring& varvalue) : CMakeVariable(varname, varvalue.c_str()) {}
|
||||
CMakeVariable::CMakeVariable(const cwstring_view varname, const fs::path& path) : CMakeVariable(varname, path.generic_wstring()) {}
|
||||
|
||||
std::wstring make_cmake_cmd(const fs::path& cmake_exe, const fs::path& cmake_script, const std::vector<CMakeVariable>& pass_variables)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче