[CMake] Issues with finding raptor in the soprano build

Laszlo Papp lpapp at kde.org
Wed Nov 16 06:42:08 EST 2011


The soprano author seems to keep a local copy of that macro:
https://projects.kde.org/projects/kdesupport/soprano/repository/revisions/master/entry/cmake/modules/FindPackageHandleStandardArgs.cmake

It is probably outdated since "vimdiff
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake
../cmake/modules/FindPackageHandleStandardArgs.cmake" gives a lot of
differences.

Would it be possible to just update that file from upstream cmake, and
be done ? What is the general approach suggested for developers to
invoke cmake in such situations where it needs to run with old and new
cmake versions, too ?

1. Using the compatible old version everywhere, if possible ?
2. Keep local copies of such modules
3. Something else ?

Best Regards,
Laszlo Papp

On Wed, Nov 16, 2011 at 11:39 AM, Michael Wild <themiwi at gmail.com> wrote:
> On 11/16/2011 09:35 AM, Laszlo Papp wrote:
>>> What version of CMake are you using? The extended signature of
>>> find_package_handle_standard_args() you use in FindRaptor.cmake became
>>> only available in CMake 2.8.4.
>>
>> Sadly 2.8.2 is the available version:
>> http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/c/cmake/
>>
>> I was claiming a lot internally we should update it on Harmattan, but
>> I have not found anybody really supporting this idea. :/
>>
>> What would be the workaround for our environment ? Patch the
>> FindRaptor.cmake file ? If yes, can someone give a hint, how ?
>>
>> Best Regards,
>> Laszlo Papp
>
> You could handle version detection manually. Something like this should do:
>
> set(RAPTOR_VERSION_IS_OK TRUE)
> if(Raptor_FIND_VERSION)
>  if(Raptor_FIND_VERSION_EXACT AND
>      NOT ${RAPTOR_VERSION} VERSION_EQUAL ${Raptor_FIND_VERSION})
>    set(RAPTOR_VERSION_IS_OK FALSE)
>  elseif(${RAPTOR_VERSION} VERSION_LESS ${Raptor_FIND_VERSION})
>    set(RAPTOR_VERSION_IS_OK FALSE)
>  endif()
> endif()
>
> And then use RAPTOR_VERSION_IS_OK in the
> find_package_handle_standard_args() call.
>
> Michael
>


More information about the CMake mailing list