mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 09:49:01 +08:00
fix compile on g++ 6 (#13290)
This commit is contained in:
parent
a3142da3ac
commit
4467eb334a
@ -287,8 +287,8 @@ namespace vcpkg::Json
|
|||||||
underlying_t underlying_;
|
underlying_t underlying_;
|
||||||
};
|
};
|
||||||
|
|
||||||
VCPKG_MSVC_WARNING(push);
|
VCPKG_MSVC_WARNING(push)
|
||||||
VCPKG_MSVC_WARNING(disable : 4505);
|
VCPKG_MSVC_WARNING(disable : 4505)
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Span<const StringView> IDeserializer<Type>::valid_fields() const
|
Span<const StringView> IDeserializer<Type>::valid_fields() const
|
||||||
@ -332,7 +332,7 @@ namespace vcpkg::Json
|
|||||||
return nullopt;
|
return nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
VCPKG_MSVC_WARNING(pop);
|
VCPKG_MSVC_WARNING(pop)
|
||||||
|
|
||||||
struct ReaderError
|
struct ReaderError
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,9 @@ namespace vcpkg
|
|||||||
return Configuration{std::move(registries)};
|
return Configuration{std::move(registries)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr StringLiteral ConfigurationDeserializer::DEFAULT_REGISTRY;
|
||||||
|
constexpr StringLiteral ConfigurationDeserializer::REGISTRIES;
|
||||||
|
|
||||||
ConfigurationDeserializer::ConfigurationDeserializer(const VcpkgCmdArguments& args)
|
ConfigurationDeserializer::ConfigurationDeserializer(const VcpkgCmdArguments& args)
|
||||||
{
|
{
|
||||||
registries_enabled = args.registries_enabled();
|
registries_enabled = args.registries_enabled();
|
||||||
|
@ -38,6 +38,7 @@ namespace vcpkg::Metrics
|
|||||||
res.push_back(hex[(bits >> 0) & 0x0F]);
|
res.push_back(hex[(bits >> 0) & 0x0F]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
constexpr char append_hexits::hex[17];
|
||||||
|
|
||||||
// note: this ignores the bits of these numbers that would be where format and variant go
|
// note: this ignores the bits of these numbers that would be where format and variant go
|
||||||
static std::string uuid_of_integers(uint64_t top, uint64_t bottom)
|
static std::string uuid_of_integers(uint64_t top, uint64_t bottom)
|
||||||
|
@ -34,6 +34,11 @@ namespace vcpkg
|
|||||||
|
|
||||||
StringView RegistryImplDeserializer::type_name() const { return "a registry"; }
|
StringView RegistryImplDeserializer::type_name() const { return "a registry"; }
|
||||||
|
|
||||||
|
constexpr StringLiteral RegistryImplDeserializer::KIND;
|
||||||
|
constexpr StringLiteral RegistryImplDeserializer::PATH;
|
||||||
|
constexpr StringLiteral RegistryImplDeserializer::KIND_BUILTIN;
|
||||||
|
constexpr StringLiteral RegistryImplDeserializer::KIND_DIRECTORY;
|
||||||
|
|
||||||
Span<const StringView> RegistryImplDeserializer::valid_fields() const
|
Span<const StringView> RegistryImplDeserializer::valid_fields() const
|
||||||
{
|
{
|
||||||
static const StringView t[] = {KIND, PATH};
|
static const StringView t[] = {KIND, PATH};
|
||||||
@ -76,6 +81,8 @@ namespace vcpkg
|
|||||||
|
|
||||||
StringView RegistryDeserializer::type_name() const { return "a registry"; }
|
StringView RegistryDeserializer::type_name() const { return "a registry"; }
|
||||||
|
|
||||||
|
constexpr StringLiteral RegistryDeserializer::PACKAGES;
|
||||||
|
|
||||||
Span<const StringView> RegistryDeserializer::valid_fields() const
|
Span<const StringView> RegistryDeserializer::valid_fields() const
|
||||||
{
|
{
|
||||||
static const StringView t[] = {
|
static const StringView t[] = {
|
||||||
|
@ -442,6 +442,11 @@ namespace vcpkg
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr StringLiteral DependencyDeserializer::NAME;
|
||||||
|
constexpr StringLiteral DependencyDeserializer::FEATURES;
|
||||||
|
constexpr StringLiteral DependencyDeserializer::DEFAULT_FEATURES;
|
||||||
|
constexpr StringLiteral DependencyDeserializer::PLATFORM;
|
||||||
|
|
||||||
struct FeatureDeserializer : Json::IDeserializer<std::unique_ptr<FeatureParagraph>>
|
struct FeatureDeserializer : Json::IDeserializer<std::unique_ptr<FeatureParagraph>>
|
||||||
{
|
{
|
||||||
virtual StringView type_name() const override { return "a feature"; }
|
virtual StringView type_name() const override { return "a feature"; }
|
||||||
@ -482,6 +487,10 @@ namespace vcpkg
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr StringLiteral FeatureDeserializer::NAME;
|
||||||
|
constexpr StringLiteral FeatureDeserializer::DESCRIPTION;
|
||||||
|
constexpr StringLiteral FeatureDeserializer::DEPENDENCIES;
|
||||||
|
|
||||||
// We "parse" this so that we can add actual license parsing at some point in the future
|
// We "parse" this so that we can add actual license parsing at some point in the future
|
||||||
// without breaking anyone
|
// without breaking anyone
|
||||||
struct LicenseExpressionDeserializer : Json::IDeserializer<std::string>
|
struct LicenseExpressionDeserializer : Json::IDeserializer<std::string>
|
||||||
@ -622,6 +631,10 @@ namespace vcpkg
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr StringView LicenseExpressionDeserializer::EXPRESSION_WORDS[];
|
||||||
|
constexpr StringView LicenseExpressionDeserializer::VALID_LICENSES[];
|
||||||
|
constexpr StringView LicenseExpressionDeserializer::VALID_EXCEPTIONS[];
|
||||||
|
|
||||||
struct ManifestDeserializer : Json::IDeserializer<std::unique_ptr<SourceControlFile>>
|
struct ManifestDeserializer : Json::IDeserializer<std::unique_ptr<SourceControlFile>>
|
||||||
{
|
{
|
||||||
virtual StringView type_name() const override { return "a manifest"; }
|
virtual StringView type_name() const override { return "a manifest"; }
|
||||||
@ -721,6 +734,21 @@ namespace vcpkg
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constexpr StringLiteral ManifestDeserializer::NAME;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::VERSION;
|
||||||
|
|
||||||
|
constexpr StringLiteral ManifestDeserializer::PORT_VERSION;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::MAINTAINERS;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::DESCRIPTION;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::HOMEPAGE;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::DOCUMENTATION;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::LICENSE;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::DEPENDENCIES;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::DEV_DEPENDENCIES;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::FEATURES;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::DEFAULT_FEATURES;
|
||||||
|
constexpr StringLiteral ManifestDeserializer::SUPPORTS;
|
||||||
|
|
||||||
Parse::ParseExpected<SourceControlFile> SourceControlFile::parse_manifest_file(const fs::path& path_to_manifest,
|
Parse::ParseExpected<SourceControlFile> SourceControlFile::parse_manifest_file(const fs::path& path_to_manifest,
|
||||||
const Json::Object& manifest)
|
const Json::Object& manifest)
|
||||||
{
|
{
|
||||||
|
@ -856,4 +856,46 @@ namespace vcpkg
|
|||||||
}
|
}
|
||||||
m_str.append(line_start, best_break);
|
m_str.append(line_start, best_break);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// out-of-line definitions since C++14 doesn't allow inline constexpr static variables
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::VCPKG_ROOT_DIR_ENV;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::VCPKG_ROOT_DIR_ARG;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::MANIFEST_ROOT_DIR_ARG;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::BUILDTREES_ROOT_DIR_ARG;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::DOWNLOADS_ROOT_DIR_ENV;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::DOWNLOADS_ROOT_DIR_ARG;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::INSTALL_ROOT_DIR_ARG;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::PACKAGES_ROOT_DIR_ARG;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::SCRIPTS_ROOT_DIR_ARG;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::DEFAULT_VISUAL_STUDIO_PATH_ENV;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::TRIPLET_ENV;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::TRIPLET_ARG;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::OVERLAY_PORTS_ENV;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::OVERLAY_PORTS_ARG;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::OVERLAY_TRIPLETS_ARG;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::BINARY_SOURCES_ARG;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::DEBUG_SWITCH;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::SEND_METRICS_SWITCH;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::DISABLE_METRICS_ENV;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::DISABLE_METRICS_SWITCH;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::PRINT_METRICS_SWITCH;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::WAIT_FOR_LOCK_SWITCH;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::JSON_SWITCH;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::FEATURE_FLAGS_ENV;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::FEATURE_FLAGS_ARG;
|
||||||
|
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::FEATURE_PACKAGES_SWITCH;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::BINARY_CACHING_FEATURE;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::BINARY_CACHING_SWITCH;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::COMPILER_TRACKING_FEATURE;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::MANIFEST_MODE_FEATURE;
|
||||||
|
constexpr StringLiteral VcpkgCmdArguments::REGISTRIES_FEATURE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user