]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
qa: use FOUND_VAR to be backward compatible with cmake 2.8.12
authorKefu Chai <kchai@redhat.com>
Thu, 15 Nov 2018 01:47:27 +0000 (09:47 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 15 Nov 2018 03:57:52 +0000 (11:57 +0800)
commit2dc0f862277bd36f48f5f24abde217bac949b7fe
tree6f5e3b9d10e2b21860794e01b4b5d78f1d0b27c2
parentae36a614465dc4ddba830ca9a89d1d106ee8890b
qa: use FOUND_VAR to be backward compatible with cmake 2.8.12

before this change, we assume that the variable set if rados::radospp is
found will be radospp_FOUND, but this is a feature cmake 3, see
https://cmake.org/cmake/help/v3.3/module/FindPackageHandleStandardArgs.html

while the cmake shipped by centos is cmake 2.8.12, where the variable
name will be <UPPERCASED_NAME>_FOUND, see
https://cmake.org/cmake/help/v2.8.12/cmake.html#module:FindPackageHandleStandardArgs

in the test of test_envlibrados_for_rocksdb.sh, we are using cmake not
the cmake3 offered by EPEL7, so RADOSPP_FOUND will be set instead. that's why
executable env_librados_test will fail to link against rados::radospp.
as rados::radospp won't be defined if radospp_FOUND is not defined/set.

after this change, the 2nd mode of FIND_PACKAGE_HANDLE_STANDARD_ARGS()
is used instead to ensure that radospp_FOUND is defined even if cmake
2.8.12 is used.

also, the message() commands for debugging purpose are removed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/rados/0001-cmake-add-Findrados.cmake-and-use-it.patch