On 11/12/2014 10:23 AM, Domen Vrankar wrote: > I would also prefer implicit behavior but in that case should it still > be treated as error if CMake minimum required version is set to less > than 3.1 since it would break on older versions of CMake? > I know that CMake policies exist but I am not familiar with them... > Could they be used for this?
Policies are for making backward-incompatible behavior changes for the better. In this case old code cannot break, so we should not need a policy. You could check the value of the CMAKE_MINIMUM_REQUIRED_VERSION variable to decide whether to make it an error. Extend the error message to mention that it could be fixed by requiring a new enough version of CMake. OTOH, there have been many times in the past where we've converted an error case to a non-error case without such a check. Projects should test themselves with the oldest CMake they support anyway. I have no strong feeling on this requirement. -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