[cmake-developers] find_package error wording

Brad King brad.king at kitware.com
Fri Feb 17 13:45:13 EST 2012


On 2/17/2012 1:28 PM, Alexander Neundorf wrote:
>> We can adjust it slightly to avoid the policy warning when FooConfig
>> is found and Foo_DIR is set:
>>
>>    - search for FindFoo.cmake, use if found
>>    - if not found, check new policy setting
>>    - if not set, enter config mode and emit both the policy warning
>>      and the current error if not found
>>    - 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
>
> Just to make sure I understand:
> behave as described intially, but don't warn if the config file has been found
> via Foo_DIR.
> Right ?
> Ok with me.

Yes.  That will avoid unnecessary policy warnings when things work.

Please push a proposed implementation to the stage for review.
The documentation of the policy will have a lot of history to
explain this.

Thanks,
-Brad


More information about the cmake-developers mailing list