mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 18:32:47 +08:00
[vcpkg] Improve default triplets for non-windows
This commit is contained in:
parent
6b7c48646b
commit
3c7997215b
@ -46,7 +46,7 @@ namespace vcpkg::Strings
|
|||||||
|
|
||||||
bool case_insensitive_ascii_equals(const CStringView left, const CStringView right);
|
bool case_insensitive_ascii_equals(const CStringView left, const CStringView right);
|
||||||
|
|
||||||
std::string ascii_to_lowercase(const std::string& input);
|
std::string ascii_to_lowercase(std::string input);
|
||||||
|
|
||||||
bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern);
|
bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern);
|
||||||
|
|
||||||
|
@ -157,7 +157,15 @@ static void inner(const VcpkgCmdArguments& args)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if defined(_WIN32)
|
||||||
default_triplet = Triplet::X86_WINDOWS;
|
default_triplet = Triplet::X86_WINDOWS;
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
default_triplet = Triplet::from_canonical_name("x64-osx");
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
default_triplet = Triplet::from_canonical_name("x64-freebsd");
|
||||||
|
#else
|
||||||
|
default_triplet = Triplet::from_canonical_name("x64-linux");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,11 +108,10 @@ namespace vcpkg::Strings
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ascii_to_lowercase(const std::string& input)
|
std::string ascii_to_lowercase(std::string s)
|
||||||
{
|
{
|
||||||
std::string output(input);
|
std::transform(s.begin(), s.end(), s.begin(), &details::tolower_char);
|
||||||
std::transform(output.begin(), output.end(), output.begin(), &details::tolower_char);
|
return s;
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern)
|
bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern)
|
||||||
|
Loading…
Reference in New Issue
Block a user