[cmake-developers] Bad error message when a package could not be found - make find_package() not search config files by default

Brad King brad.king at kitware.com
Fri Feb 17 08:53:35 EST 2012


On 2/17/2012 5:07 AM, Alexander Neundorf wrote:
> The documentation page says: "The REQUIRED option stops processing with an
> error message if the package cannot be found."
>
> I interpret this as "stops processing immediately".

This has always been the intended meaning.  The idea is that code following
the line can be written without checking whether the package was FOUND
and assume certain variables are set.  If you want other behavior then
do not pass REQUIRED and check if(...FOUND) manually.

-Brad



More information about the cmake-developers mailing list