[CMake] Setting Policy CMP0028

Nils Gladitz nilsgladitz at gmail.com
Fri Jul 11 09:47:13 EDT 2014


On 07/11/2014 03:33 PM, pierre.andersson at se.atlascopco.com wrote:
> Then it is odd that it does not work, the warning is given during
> generation time and I have tested to print the status of the 0028 policy
> at all points where the projects that get the warning has their
> add_library/add_executable command called, as well as at the end of
> their respective CMakeLists.txt files and it remains in the state OLD
> throughout.
> At which point is the state of the policy stored when it comes to
> generation time? I can see that it works when I construct a minimal
> example, so knowing when it's state is 'used' would greaty help in
> solving the issue or creating a minimal example that showcases the problem.

Given that the warning is at generation time I think it should be the 
state of the policy at the end of the CMakeLists.txt that defines the 
target (add_library/add_executable).

Nils



More information about the CMake mailing list