[CMake] Setting Policy CMP0028
pierre.andersson at se.atlascopco.com
pierre.andersson at se.atlascopco.com
Mon Jul 14 09:58:20 EDT 2014
Just to update. I managed to solve the issue by adding this line:
cmake_policy(SET CMP0028 OLD)
directly to the macro that ends up calling the add_library/add_executable
commands. Thank you for the help.
Regards,
Pierre Andersson
From: Nils Gladitz <nilsgladitz at gmail.com>
To: pierre.andersson at se.atlascopco.com
Cc: cmake at cmake.org
Date: 2014-07-11 15:47
Subject: Re: [CMake] Setting Policy CMP0028
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140714/5337cccb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140714/5337cccb/attachment.gif>
More information about the CMake
mailing list