[CMake] CMP0071

Konstantin Tokarev annulen at yandex.ru
Mon Oct 9 06:54:13 EDT 2017



08.10.2017, 23:30, "Craig Scott" <craig.scott at crascit.com>:
> On Sun, Oct 8, 2017 at 1:13 AM, Konstantin Tokarev <annulen at yandex.ru> wrote:
>
>> 07.10.2017, 14:18, "Konstantin Tokarev" <annulen at yandex.ru>:
>>> Hello,
>>>
>>> I've just learned about CMP0071 introduced in upcoming 3.10 release.
>>>
>>> Is it possible to replace new policy with new global variable/per-target property to avoid need setting of SKIP_AUTOMOC OFF on each generated file separately?
>>>
>>> Thanks.
>>
>> Also, I've found following issue: setting CMP0071 to OLD in the top-level project does not suppress warnings, unless I set CMP0071 to OLD in each subdirectory. cmake_policy(GET CMP0071 var) in subdir's CMakeLists.txt returns OLD, but warning is suppressed only if I set it to OLD once again.
>
> Just a thought, do you have calls to cmake_minimum_required(VERSION ...) or cmake_policy(VERSION ...) in your subdirs? These reset the policy settings to match the specified version.

That was the case, thanks!

>
> --
> Craig Scott
> Melbourne, Australia
> https://crascit.com


-- 
Regards,
Konstantin


More information about the CMake mailing list