| 569 | } |
| 570 | |
| 571 | cm::optional<cmPackageInfoReader::Pep440Version> |
| 572 | cmPackageInfoReader::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 | |
| 589 | std::vector<cmPackageRequirement> cmPackageInfoReader::GetRequirements() const |
| 590 | { |
no test coverage detected