On 11/08/2016 03:11 PM, Dvir Yitzchaki wrote:
But how do you know which version to declare on cmake_minimum_required? If this feature will be added it won't be far from writing a script that scans the commands you use and outputs the first appropriate version.
Strictly speaking cmake_minimum_required(VERSION) is not about command availability but rather about behavior (cmake policies). CMake does not diagnose or prevent use of commands that were introduced after the current policy version.
No automation can detect which behaviors you might expect or require based on the commands you are using.
I'd start by requesting the highest possible version I could justify (e.g. based on availability on target platforms and user convenience) and then start from there. For existing projects policy warnings help migrating to newer behaviors and versions as they become available / justifiable.
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
