[CMake] Setting Policy CMP0028

pierre.andersson at se.atlascopco.com pierre.andersson at se.atlascopco.com
Fri Jul 11 09:33:04 EDT 2014


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.

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 14:32
Subject:	Re: [CMake] Setting Policy CMP0028



On 07/11/2014 01:33 PM, pierre.andersson at se.atlascopco.com wrote:
> Thanks for the response. None of those are called in the CMakeLists.txt
> file that the warning is issued for, they are both called in a file
> above that one  in the build tree but said file also sets the CML0028
> policy afterwards. Is it possible that a call to cmake_minimum_required
> resets the policies even for CMakeLists.txt that are not below it in the
> build system tree?

You can not change policies for the parent; only for the current and
subdirectories.

It might help if you could create a minimal, selfcontained test case to
reproduce and debug the issue.

Nils

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140711/a45a0ff3/attachment-0001.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/20140711/a45a0ff3/attachment-0001.gif>


More information about the CMake mailing list