irods / irods_resource_plugin_rados

Cacheless Ceph/rados resource plugin for iRODS
BSD 3-Clause "New" or "Revised" License
7 stars 6 forks source link

Cmake3 find_package error with iRODS 4.2.4 #14

Closed sviscapi closed 5 years ago

sviscapi commented 5 years ago

Hi all,

I had to edit irods_resource_plugin_rados/CMakeLists.txt in order to make it compatible with the latest available iRODS version:

find_package(IRODS 4.2.4 REQUIRED)

But according to the official cmake documentation, (IRODS 4.2.2 REQUIRED) should still be working with any superior version. If I'm not mistaken, "REQUIRED" actually sets the minimun required version of that package...

https://cmake.org/cmake/help/v3.12/manual/cmake-packages.7.html

What am I doing wrong ?

Cheers, Samuel from CINES (Montpellier, France)

https://www.cines.fr/en/

trel commented 5 years ago

Without an additional <package>ConfigVersion.cmake file [1] that declares specific versioning compatibility, there is only match or no-match capability to the strings that CMake sees from the provided package (in this case, via our irods-dev(el) package). We haven't gotten sophisticated enough to make that promise yet, so we're only matching explicitly at this time (requiring your edit above to match 4.2.4).

The REQUIRED keyword is not about the version, it's about the named package itself being present for the downstream code to proceed.

So, you're not doing anything wrong, you need that 4.2.4 edit to build against our 4.2.4 package.

[1] https://cmake.org/cmake/help/v3.12/module/CMakePackageConfigHelpers.html#generating-a-package-version-file

trel commented 5 years ago

All that said, we'll update the CMakeLists.txt file to match the latest 4-2-stable version before we stamp an official release of the plugin.