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

Function CheckSchemaVersion

Source/cmPackageInfoReader.cxx:121–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121bool CheckSchemaVersion(Json::Value const& data)
122{
123 std::string const& version = ToString(data["cps_version"]);
124
125 // Check that a valid version is specified.
126 if (version.empty()) {
127 return false;
128 }
129
130 // Check that we understand this version.
131 return cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL,
132 version, "0.13") &&
133 cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, version, "0.15");
134
135 // TODO Eventually this probably needs to return the version tuple, and
136 // should share code with cmPackageInfoReader::ParseVersion.
137}
138
139bool ComparePathSuffix(std::string const& path, std::string const& suffix)
140{

Callers 1

ReadMethod · 0.85

Calls 3

VersionCompareFunction · 0.85
ToStringFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…