[CMake] How to use CMAKE_POLICY?

David Cole david.cole at kitware.com
Wed Dec 19 11:56:40 EST 2012


I think the safest/wisest thing to do in this case is to update your
minimum required version to CMake 2.8.4, and then adjust your custom code
to eliminate the warning if it still occurs.

2.8.4 is more than 18 months old at this point. Is there a reason why 2.6.2
is still required for some?


On Wed, Dec 19, 2012 at 11:24 AM, Alexander Neundorf <
a.neundorf-work at gmx.net> wrote:

> On Wednesday 19 December 2012, Marcel Loose wrote:
> > Hi David,
> >
> > I need to set a policy to OLD, because I have wrapped a few existing
> > Find*.cmake files to overcome some bugs or shortcomings. However, since
> > CMake 2.8.4 (or 2.8.3, I'm not sure), this triggers a policy warning
> > CMP0017 with newer versions of CMake, because some macros are now
> > included from my CMAKE_MODULE_PATH and some from CMAKE_CURRENT_LIST_DIR,
> > which expands to somewhere inside CMAKE_ROOT.
>
> you get this warning if a module from CMake/Modules/ includes a module from
> outside CMake/Modules/, if the same module exists also inside
> CMake/Modules/.
>
> This is a serious warning, because the including module expects the module
> from the same cmake version as itself, having the features as they are in
> this
> version, and by getting a different file it may not get what it expects.
>
> Alex
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121219/40c3dc9d/attachment.htm>


More information about the CMake mailing list