[RFC] cmake modules and keeping source compatibility

Alexander Neundorf neundorf at kde.org
Fri Jan 18 18:17:02 GMT 2008


we are shipping KDE 4.0.0 now and so have to keep source compatibility.
This means also that the cmake files installed on the users systems have to 
stay compatible.
Here is a document describing what needs to be taken care of:
Please comment on it.

Two more things:
-do we need to keep source compatibility for all cmake files from all modules 
or is kdelibs enough ? If kdelibs would be enough, this would simply mean 
that the other modules like kdebase don't install their cmake files.

There were a few commits already which change cmake modules so that a higher 
version of the respective library is now required, otherwise they fail.
Please comment.

I'm afraid this is also source incompatible:

> SVN commit 762185 by trueg:
> Min Soprano version is now 2.0
> --- trunk/KDE/kdelibs/cmake/modules/FindSoprano.cmake #762184:762185
> @@ -79,10 +79,10 @@
> "1.99")
> +      if(SOPRANO_VERSION STRLESS "2.0")
>          set(Soprano_FOUND FALSE)
> -        message(FATAL_ERROR "Soprano version ${SOPRANO_VERSION} is too
> old. Please install 1.99 or newer") -      endif(SOPRANO_VERSION STRLESS
> "1.99")
> +        message(FATAL_ERROR "Soprano version ${SOPRANO_VERSION} is too
> old. Please install 2.0 or newer") +      endif(SOPRANO_VERSION STRLESS
> "2.0")
>    endif(Soprano_FOUND)

I'm not sure we may do such changes now.

The change has the effect that a cmake module now fails (if the soprano 
version is too old), whereas with the previous version it worked.

If there is a 3rd party application which also uses FindSoprano.cmake, 
installed with KDE, it may not build anymore after an update of KDE. Insofar 
this could be considered a source incompatible change, which we must not do.

A better approach would be not to hardcode the required version in the cmake 
module, but to set it from the outside:

find_package(Soprano REQUIRED)

and then compare with SOPRANO_REQUIRED_VERSION in FindSoprano.cmake.

This issue is not specific to FindSoprano.cmake, there was also a similar 
commit to FindSharedMimeInfo.cmake.

One could argue that if a KDE is installed which has this version of 
FindSoprano, then the correct version of Soprano is installed anyways. But 
this must not be true. It could be an optional package in KDE (so KDE still 
builds without it), but it could be a required package for the 3rd party 
application, which would then fail to build (and which doesn't require the 
newer version).

So I'm afraid this is really a source incompatible change and must be 


More information about the kde-core-devel mailing list