On 06/10/2015 01:41 AM, Domen Vrankar wrote:
> So that's why my newly added test broke with CMP0011 error :) I didn't
> even know that I was using this policy with old functionality... Can I
> somehow force treating of all policies as errors to spot such cases
> for e.g. in tests?

See my response to the GP for a side note about policies in tests.

> Should cmake_minimum_required also be used in CMake scripts (added
> with -P argument to CMake command) not just CMakeLists.txt?

Yes.

> And do we really still need version 2.6 as default (we could bump this
> version to where current policies are still treated as warnings not
> errors)?

To which default do you refer?  Where in our code is it set?
Likely we cannot update it because it could change behavior
of existing scripts with no transition warning ever given.

> I'd also be glad if missing cmake_minimum_required in root CMake
> list/script would be treated as error and not as warning since you can
> get old policies in by accident.

Yes, we should consider enforcing CMP0000 in script mode too
or perhaps add a separate policy for it.

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

Reply via email to