KDE/kdelibs/cmake/modules

Alexander Neundorf neundorf at kde.org
Thu Jan 17 19:29:52 CET 2008


Hi,

On Wednesday 16 January 2008, Sebastian Trueg wrote:
> 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 @@
>      STRING(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n"
> SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) IF
> (SOPRANO_VERSION_MATCH)
>        STRING(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1"
> SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) -      if(SOPRANO_VERSION STRLESS
> "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_VERSION_MATCH)
>    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:

set(SOPRANO_REQUIRED_VERSION 2.0)
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 
reverted.

Does anybody see this differently ?

Alex


More information about the Kde-buildsystem mailing list