MCPcopy Create free account
hub / github.com/Kitware/CMake / ParseVersion

Method ParseVersion

Source/cmPackageInfoReader.cxx:571–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569}
570
571cm::optional<cmPackageInfoReader::Pep440Version>
572cmPackageInfoReader::ParseVersion(
573 cm::optional<std::string> const& version) const
574{
575 // Check that we have a version.
576 if (!version) {
577 return cm::nullopt;
578 }
579
580 // Check if we know how to parse the version.
581 Json::Value const& schema = this->Data["version_schema"];
582 if (schema.isNull() || cmStrCaseEq(ToString(schema), "simple"_s)) {
583 return ParseSimpleVersion(*version);
584 }
585
586 return cm::nullopt;
587}
588
589std::vector<cmPackageRequirement> cmPackageInfoReader::GetRequirements() const
590{

Callers 2

CheckVersionMethod · 0.45
WindowsCEEnvironmentMethod · 0.45

Calls 4

cmStrCaseEqFunction · 0.85
ParseSimpleVersionFunction · 0.85
isNullMethod · 0.80
ToStringFunction · 0.70

Tested by

no test coverage detected