diff --git a/Source/cmPackageInfoReader.cxx b/Source/cmPackageInfoReader.cxx index a5349cada7..0bb3e35e71 100644 --- a/Source/cmPackageInfoReader.cxx +++ b/Source/cmPackageInfoReader.cxx @@ -376,7 +376,7 @@ std::unique_ptr 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; } diff --git a/Tests/FindPackageCpsTest/cps/foo-relative@default.cps b/Tests/FindPackageCpsTest/cps/foo-relative@default.cps index 19a55dd09f..c9e8d4f0c8 100644 --- a/Tests/FindPackageCpsTest/cps/foo-relative@default.cps +++ b/Tests/FindPackageCpsTest/cps/foo-relative@default.cps @@ -1,5 +1,4 @@ { - "cps_version": "0.13", "name": "Foo", "configuration": "default", "components": {