mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
cmPackageInfoReader: Inherit cps_version
Modify cmPackageInfoReader to not require schema_version in supplemental files (i.e. appendices and/or configuration-specific files). This is important as our own generation is not including cps_version in supplemental files, and it is forbidden in the same according to a strict reading of the specification.
This commit is contained in:
@@ -376,7 +376,7 @@ std::unique_ptr<cmPackageInfoReader> cmPackageInfoReader::Read(
|
||||
// - the input is a JSON object
|
||||
// - the input has a "cps_version" that we (in theory) know how to parse
|
||||
Json::Value data = ReadJson(path);
|
||||
if (!data.isObject() || !CheckSchemaVersion(data)) {
|
||||
if (!data.isObject() || (!parent && !CheckSchemaVersion(data))) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"cps_version": "0.13",
|
||||
"name": "Foo",
|
||||
"configuration": "default",
|
||||
"components": {
|
||||
|
||||
Reference in New Issue
Block a user