On 08/12/2014 03:59 AM, Marcel Loose wrote:
> Another problem I faced with policy CMP0022 is that I was unable to
> really silence it. Setting the policy to OLD doesn't really work (at
> least not in my case), maybe because the "cmake_policy()" command is
> scoped(?).

For CMP0022 and CMP0023 the policy setting is recorded on each target
when it is created by and add_library command.  That affects all
target_link_libraries calls that give the library as the first argument.

> setting the policy to OLD once at top-level doesn't seem to work

Any call to cmake_minimum_required(VERSION) will unset policies
introduced in versions larger than that named.

FYI, the only intended use case for setting a policy to OLD is to
quiet warnings in a maintenance branch of an existing release.
Some day support for OLD behavior of some policies may be dropped,
so all project development moving forward should set the policy
to NEW.

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to