Hi,

The documentation notes that Policies are not feature toggles:

 http://www.cmake.org/cmake/help/git-master/manual/cmake-policies.7.html

However, the reality is that Policies *are* feature toggles because they are 
so long-lived. Users have no expectation that Policies will 'stop working', 
and happily set them to OLD and encourage others to do the same. I see this 
on StackOverflow all the time, and on the users mailing list.

Code for Policies is also often complex. I often encounter Policies which 
are ancient and which get in the way of code clean up generally. 

We also encountered this with CMP0024 and CMP0026 getting in the way in 
2013. The refactoring I'm doing now will encounter those two again. I'd also 
prefer to drop CMP0011 rather than deal with its complexity in my current 
refactoring. CMP0011 was introduced in 2009.


I propose a policy that a Policy may be changed to REQUIRED_IF_USED in a 
release two years following the release which introduced it. Such a change 
will then result in an error if code attempts to set it to OLD, and 
recommend the user to use an older release or fix the code instead.

Thoughts?

Thanks,

Steve.


-- 

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-developers

Reply via email to