On 08-Nov-16 22:11, Dvir Yitzchaki wrote: > But how do you know which version to declare on cmake_minimum_required? I do hit this too. This would be a very useful feature. Sometimes I have to manually "scan" the docs to figure out some simple facts about newly introduces variables/commands.
On 08-Nov-16 22:22, Nils Gladitz wrote: > 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). Except it's exactly opposite :) `cmake_minimum_required` is about new features/commands, and policies is about behavior. If you have command `if(IN_LIST)` since 3.3 you can't manipulate policies in such way that it will work with CMake 2.8. However if you have warning about policy CMP0054 (since CMake 3.2) you can set policy to old without changing `cmake_minimum_required` (hence without forcing your CMake 2.8 users to upgrade to CMake 3.2). Ruslo -- 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
