mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
Add triplet::build_type()
This commit is contained in:
parent
6685ff096d
commit
52b7630c86
@ -8,12 +8,20 @@ namespace vcpkg
|
||||
{
|
||||
static triplet from_canonical_name(const std::string& triplet_as_string);
|
||||
|
||||
enum class BuildType
|
||||
{
|
||||
DYNAMIC,
|
||||
STATIC
|
||||
};
|
||||
|
||||
static const triplet X86_WINDOWS;
|
||||
static const triplet X64_WINDOWS;
|
||||
static const triplet X86_UWP;
|
||||
static const triplet X64_UWP;
|
||||
static const triplet ARM_UWP;
|
||||
|
||||
BuildType build_type() const;
|
||||
|
||||
const std::string& canonical_name() const;
|
||||
|
||||
std::string architecture() const;
|
||||
|
@ -64,4 +64,14 @@ namespace vcpkg
|
||||
auto it = std::find(this->m_canonical_name.cbegin(), this->m_canonical_name.cend(), '-');
|
||||
return std::string(it + 1, this->m_canonical_name.cend());
|
||||
}
|
||||
|
||||
triplet::BuildType triplet::build_type() const
|
||||
{
|
||||
if (this->m_canonical_name.find("static") != std::string::npos)
|
||||
{
|
||||
return BuildType::STATIC;
|
||||
}
|
||||
|
||||
return BuildType::DYNAMIC;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user