[cmake-developers] [patch] Policy CMP0046 warning fix.
Alexandru Ciobanu
alex at rogue-research.com
Fri Mar 28 16:41:52 EDT 2014
On Mar 28, 2014, at 4:15 PM, Nils Gladitz <nilsgladitz at gmail.com> wrote:
> On 28.03.2014 20:08, Alexandru Ciobanu wrote:
>> Hi,
>>
>> We were testing CMake3.0-rc3 and observed the following problem with policy CMP0046:
>> - even when policy is set to NEW behaviour, it warns about not setting policy (upon finding a missing dependency).
>>
>> It is currently warning:
>> Policy CMP0046 is not set: Error on non-existent dependency in
>> add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
>> Use the cmake_policy command to set the policy and suppress this warning.
>>
>> The dependency target "missingtarget" of target "ctarget2" does not exist.
>>
>>
>> When in fact it should just warn about the missing target:
>> The dependency target "missingtarget" of target "ctarget2" does not exist.
>>
>> I attach a minimal CMakeLists.txt file that illustrates the issue.
>>
>> I also attach a patch for review, which I believe solves the problem.
>>
>
> Thank you.
>
> This is my fault. I'll set up a new topic and will merge a slightly modified version (the "specific" message is missing in the WARN case) of your patch.
> I think I reused the pattern from another policy which is likely to be broken the same way.
> I'll try finding and fixing that as well.
>
> Nils
Sounds good.
I didn't realize that we want to show the specific error message in the WARN case.
Thanks.
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140328/de3ec501/attachment-0002.html>
More information about the cmake-developers
mailing list