[CMake] Version compatibility?

Craig Scott craig.scott at crascit.com
Mon Apr 25 17:49:14 EDT 2016


In my case, I work with a large code base that spans many projects with
various interdependencies. Some of that code base is quite old and would
benefit from updating to more modern CMake features, but some parts of the
code I'm not free to update. For these cases, I need to understand what
CMake version a particular feature was introduced before I can start using
it and also to put in place guards so that the updated project can still be
used with older projects that don't want or can't yet move to using a newer
CMake version. In an ideal world, everyone would just move to the latest
current CMake release and our projects could use whatever CMake features
they like, but that's not the reality we live in, for various reasons. ;)

On a personal level, I also write a blog which frequently covers CMake
features. I find I am always having to go check what version a particular
CMake feature was introduced so that I can highlight to my readers what
minimum CMake version they need to set. Like Vladimir, this usually
requires me to go through release notes or older versions of the CMake docs
to work out when that particular command, variable, module, etc. was added.
It would be great if the latest version's documentation always had that
information instead, it would be more reliable and certainly more
convenient.


On Mon, Apr 25, 2016 at 11:48 PM, Nils Gladitz <nilsgladitz at gmail.com>
wrote:

> On 04/25/2016 02:29 PM, Craig Scott wrote:
>
> I personally have found myself having to look up to his sort of version
> info a lot lately. It sounds like others do too. Perhaps a more
> sustainable approach would be to include the version details in the CMAKE
> docs themselves. For each command, module, variable, etc. it's
> documentation could state the version it was added. Some may warrant
> further info for version(s) where significant changes were made (eg
> keywords added to a command). Realistically, it would have to be done
> progressively and obviously with agreement from the Kitware side. It would
> only work if it became part of the change process whereby any new features
> or changes must include such version details. It would be interesting to
> hear what Kitware think of the idea. Any chance?
>
>
> I've also made use of such information from time to time but I think it
> has been the exception and it doesn't normally come up during my regular
> development workflow.
>
> I assume for most projects there is a single
> cmake_minimum_required(VERSION).
> Which means to see what is and what isn't available I only have to check
> that specific version's documentation.
>
> I am curious as to what kind of use case results in having to require
> cross-version information as provided by the compatibility matrix "a lot".
>
> Nils
>



-- 
Craig Scott
Melbourne, Australia
http://crascit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160426/17b68059/attachment-0001.html>


More information about the CMake mailing list