[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
Thu Feb 16 11:57:48 EST 2012


On Thu, Feb 16, 2012 at 11:13 AM, Alexander Neundorf <neundorf at kde.org> wrote:
> On Thursday 16 February 2012, Brad King wrote:
>> but I do not want to require every project to change almost every
>> find_package call and generate a policy warning about every call in
>> every old project release.
>
> My impression is that config.cmake files are not yet wide spread.
[snip]
> I mean, it may not be problem yet, because maybe 90 percent of the
> find_packages() calls use Find-modules, but I am quite sure it will become
> one.

So your proposal when no extra find_package mode arg is given is:

- search for FindFoo.cmake, use if found
- if not found, check new policy setting
- if not set, warn and follow OLD behavior
- if set to OLD, enter config mode and use current error if not found
- if set to NEW, present error about no FindFoo in module path

?

Separately the CONFIG and MODULE explicit mode args can be given
to be alternative to NO_MODULE.

-Brad



More information about the cmake-developers mailing list