[CMake] CMP0020 warning

Stephen Kelly steveire at gmail.com
Tue Oct 28 17:29:11 EDT 2014


Scott Aron Bloom wrote:

> The warning message for CMP0020 seems to be completely random as to where
> you actually have to set the policy.
> 
> Im not getting the warning on my main executables, but cant seem to get
> rid of it on any of my Qt based unittests (using gmock/gtest )
> 
> I have the following line, in various places in the system,
>         cmake_policy(SET CMP0020 NEW)
> 
> but is there any documentation on where it MUST be set???

Anywhere should do. Note that policies are cleared by the 
cmake_minimum_required command. If you use that multiple times, you probably 
shouldn't.

If the problem persists, feel free to provide an example.

Thanks,

Steve.




More information about the CMake mailing list