mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-19 16:47:51 +08:00
a28138eb9e
* Add preliminary support for arm-windows and arm64-windows triplets Visual Studio 15.4 shipped with new VC tools targeting arm and arm64 for desktop. This change allows for recognition and usage of new triplets supporting arm and arm64 Windows desktop and server targets. * Remove unnecessary changes * Part 2 * Part 3 * Make detection of Arm64 _VCPKG_TARGET_ARCHITECTURE precise * Enforce usage of Visual Studio CMake generatorfor arm and temporarily arm64 targets * Address code review feedback, clean libjpeg-turbo port.cmake * [libjpeg-turbo][tiff] Reduce changes to existing libraries. * [vcpkg-cmake] Simplify toolchain selection logic and improve comments
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace vcpkg
|
|
{
|
|
struct TripletInstance;
|
|
|
|
struct Triplet
|
|
{
|
|
public:
|
|
constexpr Triplet() : m_instance(&DEFAULT_INSTANCE) {}
|
|
|
|
static Triplet from_canonical_name(const std::string& triplet_as_string);
|
|
|
|
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;
|
|
static const Triplet ARM64_UWP;
|
|
static const Triplet ARM_WINDOWS;
|
|
static const Triplet ARM64_WINDOWS;
|
|
|
|
const std::string& canonical_name() const;
|
|
const std::string& to_string() const;
|
|
size_t hash_code() const;
|
|
|
|
bool operator==(const Triplet& other) const;
|
|
bool operator<(const Triplet& other) const { return canonical_name() < other.canonical_name(); }
|
|
|
|
private:
|
|
static const TripletInstance DEFAULT_INSTANCE;
|
|
|
|
constexpr Triplet(const TripletInstance* ptr) : m_instance(ptr) {}
|
|
|
|
const TripletInstance* m_instance;
|
|
};
|
|
|
|
bool operator!=(const Triplet& left, const Triplet& right);
|
|
}
|
|
|
|
namespace std
|
|
{
|
|
template<>
|
|
struct hash<vcpkg::Triplet>
|
|
{
|
|
size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); }
|
|
};
|
|
} |