[cmake-developers] Support for version suffixes

Daniel Pfeifer daniel at pfeifer-mail.de
Tue Mar 28 05:31:09 EDT 2017

On Mon, Mar 27, 2017 at 11:03 PM, Roger Leigh <rleigh at codelibre.net> wrote:

> Hi folks,
> I'd like to bring this issue to your attention to canvas some feedback
> regarding the use of version suffixes:
>   https://gitlab.kitware.com/cmake/cmake/issues/16716
> This is basically a proposal to allow an optional version suffix like
> "-rc3", "-beta1" etc. in addition to the existing major.minor.patch.tweak
> pattern, for better interoperability with systems and software releases
> already using such suffixes, and also to permit the use of such suffixes by
> CMake projects for their own purposes.  A version suffix would be usable
> anywhere currently using 4 digit versions, with all the necessary
> functionality in CMake being updated to handle this.
> The proposal linked above contains a much more detailed rationale and
> suggested implementation strategy.  I'd be very happy to hear any thoughts
> anyone has regarding this either on the above issue, or here.

Hi Roger,

Thanks for starting this discussion!

I started a prototype for a PKGCONF mode for find_package in addition to
CONFIG and PACKAGE. In this mode, CMake parses .pc files and creates one
imported target per file where values from the .pc file are set as target
properties. It works pretty well and does not rely on pkg-config. To be
compatible with pkg-config, I needed to extend
`cmSystemTools::VersionCompare`, because pkg-config uses RPM version
comparison. This however breaks current tests because 1.2 != 1.2.0 in the
RPM version comparison.

It might be necessary to provide several version comparison algorithms like
Debian, RPM, Semver.
Also splitting the version string into components may depend on the
versioning scheme. Given OpenSSL version 1.0.2g, is that patch 2 suffix g,
or rather patch 2g?

Cheers, Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170328/2d0d61fc/attachment.html>

More information about the cmake-developers mailing list