[CMake] Adding Cmake version in online documentation
    Nils Gladitz 
    nilsgladitz at gmail.com
       
    Tue Nov  8 09:22:16 EST 2016
    
    
  
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
    
    
More information about the CMake
mailing list