aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authornicole mazzuca <mazzucan@outlook.com>2020-09-04 11:49:56 -0700
committerGitHub <noreply@github.com>2020-09-04 11:49:56 -0700
commit4467eb334aa93b18858305697cf8c20950c4e925 (patch)
tree527b5855ef13af278459761f667e3c7568126321 /toolsrc/src
parenta3142da3ac59928d694de35631d174b19c06a471 (diff)
downloadvcpkg-4467eb334aa93b18858305697cf8c20950c4e925.tar.gz
vcpkg-4467eb334aa93b18858305697cf8c20950c4e925.zip
fix compile on g++ 6 (#13290)
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg/configuration.cpp3
-rw-r--r--toolsrc/src/vcpkg/metrics.cpp1
-rw-r--r--toolsrc/src/vcpkg/registries.cpp7
-rw-r--r--toolsrc/src/vcpkg/sourceparagraph.cpp28
-rw-r--r--toolsrc/src/vcpkg/vcpkgcmdarguments.cpp42
5 files changed, 81 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg/configuration.cpp b/toolsrc/src/vcpkg/configuration.cpp
index adc1f814d..1bce07acf 100644
--- a/toolsrc/src/vcpkg/configuration.cpp
+++ b/toolsrc/src/vcpkg/configuration.cpp
@@ -57,6 +57,9 @@ namespace vcpkg
return Configuration{std::move(registries)};
}
+ constexpr StringLiteral ConfigurationDeserializer::DEFAULT_REGISTRY;
+ constexpr StringLiteral ConfigurationDeserializer::REGISTRIES;
+
ConfigurationDeserializer::ConfigurationDeserializer(const VcpkgCmdArguments& args)
{
registries_enabled = args.registries_enabled();
diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp
index d5cd0a47f..019b3a9c2 100644
--- a/toolsrc/src/vcpkg/metrics.cpp
+++ b/toolsrc/src/vcpkg/metrics.cpp
@@ -38,6 +38,7 @@ namespace vcpkg::Metrics
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
static std::string uuid_of_integers(uint64_t top, uint64_t bottom)
diff --git a/toolsrc/src/vcpkg/registries.cpp b/toolsrc/src/vcpkg/registries.cpp
index 5df38e6ef..eda20f1b9 100644
--- a/toolsrc/src/vcpkg/registries.cpp
+++ b/toolsrc/src/vcpkg/registries.cpp
@@ -34,6 +34,11 @@ namespace vcpkg
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
{
static const StringView t[] = {KIND, PATH};
@@ -76,6 +81,8 @@ namespace vcpkg
StringView RegistryDeserializer::type_name() const { return "a registry"; }
+ constexpr StringLiteral RegistryDeserializer::PACKAGES;
+
Span<const StringView> RegistryDeserializer::valid_fields() const
{
static const StringView t[] = {
diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp
index a00fd7579..94a5dbe41 100644
--- a/toolsrc/src/vcpkg/sourceparagraph.cpp
+++ b/toolsrc/src/vcpkg/sourceparagraph.cpp
@@ -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>>
{
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
// without breaking anyone
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>>
{
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,
const Json::Object& manifest)
{
diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
index 18288104f..d56de23a8 100644
--- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
+++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
@@ -856,4 +856,46 @@ namespace vcpkg
}
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;
}