From: Kefu Chai Date: Tue, 31 Oct 2017 08:58:02 +0000 (+0800) Subject: cmake: should use the value of GPERFTOOLS_LIBRARIES as REQUIRED_VARS X-Git-Tag: v13.0.1~355^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=599a9ef3ca705f33fd240b8a02c00946497ad115;p=ceph.git cmake: should use the value of GPERFTOOLS_LIBRARIES as REQUIRED_VARS otherwise it's always true, even if the libaries are not found. also the cmake output will be wrong without this change: without this change, it is: -- Found gperftools: GPERFTOOLS_TCMALLOC_LIBRARY;GPERFTOOLS_TCMALLOC_MINIMAL_LIBRARY;GPERFTOOLS_PROFILER_LIBRARY (found version "2.5.93") with this change, it would be: -- Found gperftools: /tmp/gperf/lib/libtcmalloc.so (found version "2.5.93") Signed-off-by: Kefu Chai --- diff --git a/cmake/modules/Findgperftools.cmake b/cmake/modules/Findgperftools.cmake index 3d9b7e98c243..e9aa9bfb0034 100644 --- a/cmake/modules/Findgperftools.cmake +++ b/cmake/modules/Findgperftools.cmake @@ -40,7 +40,7 @@ endforeach() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(gperftools - REQUIRED_VARS GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR + REQUIRED_VARS ${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR VERSION_VAR TCMALLOC_VERSION_STRING) -mark_as_advanced(GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR) +mark_as_advanced(${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR)