mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
Improve how find_package reports the list of candidate package configuration files that were considered but rejected to include a reason for rejection. For CPS in particular, this allows the user to tell if a CPS file was rejected due to a version mismatch, missing required components, or because the file could not be read. While we do not try to report more detail for why cmPackageInfoReader rejected a file, the possible reasons are usually easy enough to distinguish: - The file is so malformed that we cannot read a JSON object. - The schema version is not a version that CMake understands. - The root object does not contain a string named "name". - The root object does not contain an object named "components". - Prefix resolution failed. Three of these can only result from a file that fails schema validation.