mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
CPS: Be less optimistic about what we can read
Previously, `cmPackageInfoReader` made the wildly optimistic assumption that it will know how to read any CPS version that is less than 1.0 (note, the current version as of writing is 0.13). This is likely not a safe assumption. Assume instead that we only know how to read the current minor version, i.e. 0.13.x. This still allows room for the specification to make non-breaking changes, while also providing a better path for making breaking changes without CMake wrongly thinking it still understands what it's reading.
This commit is contained in:
@@ -129,7 +129,7 @@ bool CheckSchemaVersion(Json::Value const& data)
|
||||
// Check that we understand this version.
|
||||
return cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL,
|
||||
version, "0.13") &&
|
||||
cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, version, "1");
|
||||
cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, version, "0.14");
|
||||
|
||||
// TODO Eventually this probably needs to return the version tuple, and
|
||||
// should share code with cmPackageInfoReader::ParseVersion.
|
||||
|
||||
Reference in New Issue
Block a user