mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:23:02 +08:00
Introduced environment variable "VCPKG_DEFAULT_TRIPLET"
This commit is contained in:
parent
23a45e7db6
commit
eba6126d15
@ -32,7 +32,7 @@ namespace vcpkg
|
||||
//"\n"
|
||||
"Options:\n"
|
||||
" --triplet <t> Specify the target architecture triplet.\n"
|
||||
" (default: x86-windows, see 'vcpkg help triplet')\n"
|
||||
" (default: %%VCPKG_DEFAULT_TRIPLET%%, see 'vcpkg help triplet')\n"
|
||||
"\n"
|
||||
" --vcpkg-root <path> Specify the vcpkg root directory\n"
|
||||
" (default: %%VCPKG_ROOT%%)\n"
|
||||
|
@ -69,7 +69,16 @@ static void inner(const vcpkg_cmd_arguments& args)
|
||||
return command_function(args, paths);
|
||||
}
|
||||
|
||||
triplet default_target_triplet = triplet::X86_WINDOWS;
|
||||
triplet default_target_triplet;
|
||||
const auto vcpkg_default_triplet_env = System::wdupenv_str(L"VCPKG_DEFAULT_TRIPLET");
|
||||
if(!vcpkg_default_triplet_env.empty())
|
||||
{
|
||||
default_target_triplet = {std::string(vcpkg_default_triplet_env.begin(), vcpkg_default_triplet_env.end())};
|
||||
}
|
||||
else
|
||||
{
|
||||
default_target_triplet = triplet::X86_WINDOWS;
|
||||
}
|
||||
|
||||
if (args.target_triplet != nullptr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user