FPHSA does not report all components in case of failure
The FindPackageHandleStandardArgs macro lacks good error reporting in case of components. From the docu:
Enable handling of package components. In this case, the command
will report which components have been found and which are missing,
and the ``<PackageName>_FOUND`` variable will be set to ``FALSE``
if any of the required components (i.e. not the ones listed after
the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are
missing.
But an error message looks like:
Could NOT find Boost: missing: log (found
[removed-path]/BoostConfig.cmake
(found suitable exact version "1.71.0"))
What is missing is any error from e.g. the components (E.g. <comp>_NOT_FOUND_MESSAGE
could be checked) or a listing of found components. Such as the already available string COMPONENT_MESSAGE
: https://gitlab.kitware.com/cmake/cmake/blob/v3.15.0-rc1/Modules/FindPackageHandleStandardArgs.cmake#L285
Would be great if the error message could be improved to at least Could NOT find Boost: missing components: log \n
Edited by Alexander Grund