On 09.11.2016 14:57, Ruslan Baratov wrote:

Again policies are not meant to be feature toggles.
You can do a lot of things and there may be valid use cases but in general policies are not meant to be used this way.
This is made explicit in CMake's documentation on policies.
They exist to preserve backwards compatibility not to pick and choose behaviours.

So can you show an example of "valid" use of `cmake_policy` command?


To quote the documentation:
"A policy is a deprecation mechanism and not a reliable feature toggle. A policy should almost never be set to |OLD|, except to silence warnings in an otherwise frozen or stable codebase, or temporarily as part of a larger migration path."

Beyond that valid use would be e.g. cmake's own testsuite which needs to be able to toggle individual policies to verify their behaviour.

Nils

-- 

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