mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-30 02:58:54 -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.
CMake Tests Directory ********************* This directory contains the CMake test suite. See also the `CMake Testing Guide`_ and the `CMake Source Code Guide`_. .. _`CMake Testing Guide`: ../Help/dev/testing.rst .. _`CMake Source Code Guide`: ../Help/dev/source.rst Many tests exist as immediate subdirectories, but some tests are organized as follows. * ``CMakeLib/``: Source code, used for tests, that links to the ``CMakeLib`` library defined over in ``Source/``. * ``CMakeOnly/``: Deprecated. Tests that run CMake to generate a project but not build it. Superseded by ``Tests/RunCMake/``. * ``Find*/``: Tests for specific find modules that can only be run on machines with the corresponding packages installed. They are enabled in ``CMakeLists.txt`` by undocumented options used on CI builds. * ``Module/``: Tests for specific CMake modules. * ``RunCMake/``: Tests that run CMake and/or other tools while precisely checking their return code and stdout/stderr content. Useful for testing error cases and diagnostic output. See `RunCMake/README.rst`_. .. _`RunCMake/README.rst`: RunCMake/README.rst