[CMake] Adding Cmake version in online documentation

Ruslan Baratov ruslan_baratov at yahoo.com
Wed Nov 9 15:06:11 EST 2016


On 09-Nov-16 23:00, Nils Gladitz wrote:
> On 09.11.2016 15:52, Ruslan Baratov wrote:
>> Can you show the real code? The code that in your opinion doesn't
>> violate the "right way of policy usage"?
>
> It is not a question about code. It is a question about context and
> use case.
You just said that all the code I've showed is not correct and conflicts
with policies nature. So I have to ask you about the real code, because
looks like in your "world" there is no valid case of `cmake_policy`
usage and the only correct way to set policies is to use
`cmake_minimum_required` command. Hence it's not surprising that you
can't distinguish `cmake_minimum_required` and behavior controlled by
`cmake_policy`.

>
> Valid context as the documentation states would e.g. be a project that
> is no longer maintained where you have no intention of ever migrating
> to a newer CMake version.
So why the project in the middle of the migration process is not a valid
case? It is maintained but the exact migration step is paused, but I
have an intention to improve the code in future. Anyway even if the
project is no longer maintained, then what we have? We have
`cmake_minimum_required` with the version that fits **features** the
code has and `cmake_policy` to control the **behavior** of different
cmake versions.

> Or as I said cmake's testsuite.
>
> If you insist on actual code e.g. this is part of the tests that I
> wrote for CMP0054:
> https://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/RunCMake/CMP0054/CMP0054-NEW.cmake;h=23a912476024ba09fcf741e04f999b64a6e91450;hb=refs/heads/master
>
The internal CMake stuff is out of the scope of discussion. If policies
are the internals why do we need them in the documentation?

Ruslo




More information about the CMake mailing list